Skip to content

Commit ed0af6a

Browse files
authored
Merge branch 'alpha' into before-password-reset-request
2 parents 39a6a0b + 5e15403 commit ed0af6a

File tree

5 files changed

+40
-16
lines changed

5 files changed

+40
-16
lines changed

changelogs/CHANGELOG_alpha.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [8.5.0-alpha.10](https://github.com/parse-community/parse-server/compare/8.5.0-alpha.9...8.5.0-alpha.10) (2025-11-17)
2+
3+
4+
### Bug Fixes
5+
6+
* Queries with object field `authData.provider.id` are incorrectly transformed to `_auth_data_provider.id` for custom classes ([#9932](https://github.com/parse-community/parse-server/issues/9932)) ([7b9fa18](https://github.com/parse-community/parse-server/commit/7b9fa18f968ec084ea0b35dad2b5ba0451d59787))
7+
18
# [8.5.0-alpha.9](https://github.com/parse-community/parse-server/compare/8.5.0-alpha.8...8.5.0-alpha.9) (2025-11-17)
29

310

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "8.5.0-alpha.9",
3+
"version": "8.5.0-alpha.10",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {

spec/MongoTransform.spec.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,23 @@ describe('parseObjectToMongoObjectForCreate', () => {
521521
expect(output.authData).toBe('random');
522522
done();
523523
});
524+
525+
it('should only transform authData.provider.id for _User class', () => {
526+
// Test that for _User class, authData.facebook.id is transformed
527+
const userInput = {
528+
'authData.facebook.id': '10000000000000001',
529+
};
530+
const userOutput = transform.transformWhere('_User', userInput, { fields: {} });
531+
expect(userOutput['_auth_data_facebook.id']).toBe('10000000000000001');
532+
533+
// Test that for non-User classes, authData.facebook.id is NOT transformed
534+
const customInput = {
535+
'authData.facebook.id': '10000000000000001',
536+
};
537+
const customOutput = transform.transformWhere('SpamAlerts', customInput, { fields: {} });
538+
expect(customOutput['authData.facebook.id']).toBe('10000000000000001');
539+
expect(customOutput['_auth_data_facebook.id']).toBeUndefined();
540+
});
524541
});
525542

526543
it('cannot have a custom field name beginning with underscore', done => {

src/Adapters/Storage/Mongo/MongoTransform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ function transformQueryKeyValue(className, key, value, schema, count = false) {
305305
default: {
306306
// Other auth data
307307
const authDataMatch = key.match(/^authData\.([a-zA-Z0-9_]+)\.id$/);
308-
if (authDataMatch) {
308+
if (authDataMatch && className === '_User') {
309309
const provider = authDataMatch[1];
310310
// Special-case auth data.
311311
return { key: `_auth_data_${provider}.id`, value };

0 commit comments

Comments
 (0)