-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
test: Add tests for isGet
parameter in Cloud Code trigger beforeFind
#8738
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
Conversation
I will reformat the title to use the proper commit message syntax. |
Thanks for opening this pull request! |
@mtrezza i can see that we have a isGet test here ![]() The issue only occur on parse object get ? |
I checked, there is one failing test about the "get" but actually it seems that parse.get use the Also i checked quickly but it seems that the issue was there before the patch. Also i think it's a parse js sdk issue because, for example i use the graphql api and we didn't catch any issue in my company after the patch on hooks using isGet. |
I've updated the description; rather then speculating what the behavior should be, I checked what the behavior was in 6.2.1 by running the same tests on a branch of the |
There is a failing test @mtrezza on get, but it's a Parse SDK issue, maybe all SDKs are impacted |
There are currently no failing tests. All 3 tests pass, see #8738 (comment). |
I think previously also arrays of ids would not trigger beforeFind. It would be good to somehow be able to distinguish the these two cases from “regular”/previous beforeFind |
I think there is a distinction to be made here between Get (include id or array of id) and Find permissions. I think in cases where Get permissions was utilised in beforeFind in versions before 6.2.2 that |
In this PR and related issue we focus solely on whether there was change in behavior. If you have a specific test case you would like to add, to compare the behavior 6.2.1 and 6.2.2 please provide a code example and I'll be happy to run it on 6.2.1 and 6.2.2 so we can see whether there was a difference.
Also here, if there is a change in behavior, please provide a code example for a test, so we can compare the behavior. |
beforeFind
parameter isGet
beforeFind
parameter isGet
isGet
parameter in Cloud Code trigger beforeFind
Looks like you're right and I was off here. Thanks for the clarification |
Thanks for reporting back, I'll go ahead and merge this PR. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## alpha #8738 +/- ##
==========================================
- Coverage 94.33% 94.32% -0.02%
==========================================
Files 185 186 +1
Lines 14766 14773 +7
==========================================
+ Hits 13930 13934 +4
- Misses 836 839 +3
☔ View full report in Codecov by Sentry. |
… circumvent `beforeFind` query trigger; fixes security vulnerability [GHSA-fcv6-fg5r-jm9q](GHSA-fcv6-fg5r-jm9q)
🎉 This change has been released in version 6.3.0-alpha.9 |
🎉 This change has been released in version 6.4.0-beta.1 |
🎉 This change has been released in version 6.4.0-alpha.1 |
🎉 This change has been released in version 6.4.0 |
Pull Request
Issue
Closes: #8736
There are 3 ways of getting an object, in all cases the
isGet
in the beforeFind trigger should be correct; correct here means unchanged compared to behavior in version 6.2.1, to ensure release 6.2.2 did not break that behavior.Behavior in 6.2.1:
Approach
Tasks