Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3365165
D11989.id40113.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11989.id40113.diff
View Options
diff --git a/keyserver/src/deleters/account-deleters.js b/keyserver/src/deleters/account-deleters.js
--- a/keyserver/src/deleters/account-deleters.js
+++ b/keyserver/src/deleters/account-deleters.js
@@ -63,7 +63,7 @@
DELETE u, i
FROM uploads u
LEFT JOIN ids i on i.id = u.id
- WHERE u.container = ${deletedUserID};
+ WHERE u.user_container = ${deletedUserID};
DELETE FROM relationships_undirected WHERE user1 = ${deletedUserID};
DELETE FROM relationships_undirected WHERE user2 = ${deletedUserID};
DELETE FROM relationships_directed WHERE user1 = ${deletedUserID};
diff --git a/keyserver/src/deleters/upload-deleters.js b/keyserver/src/deleters/upload-deleters.js
--- a/keyserver/src/deleters/upload-deleters.js
+++ b/keyserver/src/deleters/upload-deleters.js
@@ -11,7 +11,7 @@
}
const fetchQuery = SQL`
- SELECT uploader, container
+ SELECT uploader, container, user_container AS userContainer
FROM uploads
WHERE id = ${id}
`;
@@ -21,9 +21,13 @@
throw new ServerError('invalid_parameters');
}
const [row] = result;
- const { uploader, container } = row;
+ const { uploader, container, userContainer } = row;
- if (uploader.toString() !== viewer.userID || container !== null) {
+ if (
+ uploader.toString() !== viewer.userID ||
+ container !== null ||
+ userContainer !== null
+ ) {
throw new ServerError('invalid_parameters');
}
@@ -44,6 +48,7 @@
FROM uploads u
LEFT JOIN ids i ON i.id = u.id
WHERE u.container IS NULL
+ AND u.user_container IS NULL
AND creation_time < ${oldestUnassignedUploadToKeep}
`);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 6:53 AM (5 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2579939
Default Alt Text
D11989.id40113.diff (1 KB)
Attached To
Mode
D11989: [keyserver] Update deleters to look at new user_container column
Attached
Detach File
Event Timeline
Log In to Comment