-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: guard api to builder only #17646
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: master
Are you sure you want to change the base?
Conversation
|
@cubic-dev-ai review this pull request |
@Dakuan I have started the AI code review. It will take a few minutes to complete. |
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.
No issues found across 2 files
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.
No issues found across 2 files
|
|
||
| export async function fetch(ctx: UserCtx<void, FetchRowsResponse>) { | ||
| const { tableId } = utils.getSourceId(ctx) | ||
| if (!isExternalTableID(tableId)) { |
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.
I think this should be done in the internal.ts implementation, not here.
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.
hmm i did consider that, but felt authy concerns should be nearer the API boundary, lets chat monday!
Summary by cubic
Guarded the row fetch endpoint so only builders can access internal dev-only tables. Non-builders now get a 404 in production instead of seeing dev-only tables. External tables are unaffected.
Written for commit f6b5b15. Summary will update on new commits.