-
Notifications
You must be signed in to change notification settings - Fork 4
/v1/id/_:id/expanded endpoint
#286
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
Open
thehabes
wants to merge
49
commits into
main
Choose a base branch
from
285-id-expanded
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
0cebde9
A more generic back end expand via a new /v1/id/_:id/expanded/ endpoint
thehabes c060e50
Catch the W3C SpecificResource form target variants as well
thehabes 1cb5086
changes during review
thehabes e39ff2e
changes during review
thehabes 780528a
changes from review and testing
thehabes 967ee7f
changes from testing and review
thehabes 79dc5bd
comment cleanup
thehabes 635061b
comment cleanup
thehabes 749cc51
cleanup during review
thehabes 578fa9e
Better to have location and @id match. We can consider whether the L…
thehabes 6d6c4d4
Paginate on the back end for the /expanded endpoints. Clients/browse…
thehabes 6ef2db3
No tests yet
thehabes 3c49b78
No tests yet
thehabes 1450183
Manual cleanup
thehabes 85f1b6b
Changes during review. Supporting Annotations whose body is an Array…
thehabes a62b63c
comment cleanup
thehabes 5af111e
changes during review
thehabes 4986623
changes during review and comment cleanup
thehabes 15e20d0
Changes during review and API.html simplification
thehabes 0fa5809
Changes during review
thehabes dfb0e1d
Changes during review
thehabes a1cd244
Code documentation and API documentation simplification
thehabes 82c7e27
API file fixes
thehabes 4deb217
changes and cleanup during review
thehabes c1d1297
_id constraint, the resume-point merge, the dead clone removal, and…
thehabes bf6c685
Contract alignment and API.html touch ups
thehabes 2925fe4
Contract alignment and API.html touch ups
thehabes d612701
Deleted records are not expanded, and a client supplied __rerum is ig…
thehabes c43e626
Changes from testing and review.
thehabes 96e7941
Linear big o instead of exponential. Do id/context negotiation befor…
thehabes 220c44e
Changes during testing and review for expanding
thehabes 218f4a2
undo these tests
thehabes 8f8d068
comment cleanup
thehabes 7848f73
Changes during testing and review
thehabes 0c32ddc
Changes during testing and review
thehabes 683102a
Changes during testing and review
thehabes ec43208
Changes during testing and review
thehabes 5eec897
Changes during testing and review
thehabes a841d36
Settled on functionality, time to write tests.
thehabes 0d38d52
More honest merged count
thehabes b26d428
consistency
thehabes d250456
First pass at tests
thehabes 6a039b3
Reduce and simplify
thehabes a76195a
Reduce and simplify
thehabes 2c1113b
changes during review
thehabes 8b856c1
changes during review, good to go
thehabes 50efbe8
Merge pull request #291 from CenterForDigitalHumanities/id-expanded-t…
thehabes a0d8e44
small comment cleanup. Ready to start deploying to dev.
thehabes b8eed21
a little cleanup
thehabes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This drops four reserved keys but leaves every other key alone, including
$-prefixed MongoDB operators.findLeafAnnotationsFor()pushes each surviving key straight into the query as{ [key]: value }, so a client can POST{"$where": "<js>"}and it lands as a live operator.$whereruns JavaScript on the server and this endpoint is unauthenticated, so that is a real RCE path scoped toPOST /v1/id/:_id/expanded(the GET path only reads?generator/?creator, so it is safe).Add a guard here that drops any key starting with
$, and a test asserting a$whereor$orkey is stripped.