-
Notifications
You must be signed in to change notification settings - Fork 11
feat(oauth): gitlab support #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@TotomInc is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
e83bdf9 to
963a4e7
Compare
| const localOriginal = props.draftItem.original ? await generateContentFromDocument(props.draftItem.original as DatabaseItem) : null | ||
| const gitHubOriginal = props.draftItem.githubFile?.content ? fromBase64ToUTF8(props.draftItem.githubFile.content) : null | ||
| const gitHubOriginal = props.draftItem.remoteFile?.content ? fromBase64ToUTF8(props.draftItem.remoteFile.content) : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const gitHubOriginal = props.draftItem.remoteFile?.content ? fromBase64ToUTF8(props.draftItem.remoteFile.content) : null | |
| const gitHubOriginal = props.draftItem.remoteFile?.content ? (props.draftItem.remoteFile.encoding === 'base64' ? fromBase64ToUTF8(props.draftItem.remoteFile.content) : props.draftItem.remoteFile.content) : null |
The component doesn't check the encoding before base64-decoding content, which could fail if content has a different encoding than base64.
View Details
Analysis
Missing encoding check in ContentCardReview.vue causes base64 decode error
What fails: ContentCardReview.vue line 93 unconditionally calls fromBase64ToUTF8() on remoteFile.content without checking the encoding field, causing "Invalid character" errors when content has encoding: 'utf-8'
How to reproduce:
// Content with utf-8 encoding (common in test mocks and API responses)
const remoteFile = { content: '# Hello', encoding: 'utf-8' }
// ContentCardReview.vue line 93: fromBase64ToUTF8(remoteFile.content)
// Result: Error: Invalid characterResult: JavaScript error "Invalid character" when atob() attempts to decode non-base64 content
Expected: Should check remoteFile.encoding === 'base64' before calling fromBase64ToUTF8(), like ContentEditorCode.vue line 121 and draft.ts lines 19, 30 do correctly
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
/auth/gitlab/__nuxt_studio/auth/gitlabwhich points to/server/routes/auth/gitlab.getruntime method/auth/adminto redirect to the proper provider as defined in the module configuseGitinto a shared composable, returns the proper git provider based on the module provider configGitProviderinterfacecreateGitLabProviderwith methods to fetch, commit and push to remote repositorycreateGitHubProviderwithGitProviderabstract interfacebase64, similar to GitHub providergitlabprovider in user & module configgitlab.applicationId,gitlab.applicationSecretandgitlab.instanceUrlmodule config properties with support for their own environment variablesbase64orutf-8)See #65 for context (fixes #65)
What's missing