Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion spec/ParseInstallation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,6 @@ describe('Installations', () => {
});

// TODO: Look at additional tests from installation_collection_test.go:882
// TODO: Do we need to support _tombstone disabling of installations?
// TODO: Test deletion, badge increments

describe('deviceToken deduplication on new install (no installationId match)', () => {
Expand Down
12 changes: 6 additions & 6 deletions spec/RestQuery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ describe('rest query', () => {
const internalFields = [
'_email_verify_token',
'_perishable_token',
'_tombstone',
'_email_verify_token_expires_at',
'_failed_login_count',
'_account_lockout_expires_at',
Expand All @@ -222,10 +221,11 @@ describe('rest query', () => {
user.setUsername('user1');
user.setPassword('password');
await user.signUp();
// _tombstone is registered as an internal field but has no column in the
// Postgres _User table. Querying it with master key should return empty
// results (consistent with MongoDB behavior), not throw an error.
const results = await new Parse.Query(Parse.User).exists('_tombstone').find({ useMasterKey: true });
// _session_token is registered as an internal field but has no column in
// the Postgres _User table (session tokens live in _Session). Querying it
// with master key should return empty results (consistent with MongoDB
// behavior), not throw an error.
const results = await new Parse.Query(Parse.User).exists('_session_token').find({ useMasterKey: true });
expect(results.length).toBe(0);
});

Expand All @@ -234,7 +234,7 @@ describe('rest query', () => {
user.setUsername('user1');
user.setPassword('password');
await user.signUp();
const count = await new Parse.Query(Parse.User).exists('_tombstone').count({ useMasterKey: true });
const count = await new Parse.Query(Parse.User).exists('_session_token').count({ useMasterKey: true });
expect(count).toBe(0);
});

Expand Down
1 change: 0 additions & 1 deletion spec/vulnerabilities.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3243,7 +3243,6 @@ describe('Vulnerabilities', () => {
'_account_lockout_expires_at',
'_password_changed_at',
'_password_history',
'_tombstone',
'_session_token',
];

Expand Down
7 changes: 6 additions & 1 deletion src/Adapters/Storage/Mongo/MongoTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,11 +1154,16 @@ const mongoObjectToParseObject = (className, mongoObject, schema) => {
break;
case '_acl':
break;
// `_tombstone` is a legacy field that is no longer used by Parse Server,
// but documents created by old Parse Server / Parse.com versions may still
// have it persisted. It is kept here so those documents don't fall through
// to the `default` branch and throw "bad key in untransform".
// See https://github.com/parse-community/parse-server/issues/570
case '_tombstone':
case '_email_verify_token':
case '_perishable_token':
case '_perishable_token_expires_at':
case '_password_changed_at':
case '_tombstone':
case '_email_verify_token_expires_at':
case '_account_lockout_expires_at':
case '_failed_login_count':
Expand Down
1 change: 0 additions & 1 deletion src/Controllers/DatabaseController.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const internalFields = {
_account_lockout_expires_at: { clientRead: false, masterRead: true, masterWrite: true },
_password_changed_at: { clientRead: false, masterRead: true, masterWrite: true },
_password_history: { clientRead: false, masterRead: true, masterWrite: true },
_tombstone: { clientRead: false, masterRead: true, masterWrite: false },
_session_token: { clientRead: false, masterRead: true, masterWrite: false },
/////////////////////////////////////////////////////////////////////////////////////////////
// The following fields are not accessed by their _-prefixed name through the API;
Expand Down
Loading