Page MenuHomePhabricator

D5987.id20515.diff
No OneTemporary

D5987.id20515.diff

diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js
--- a/keyserver/src/responders/user-responders.js
+++ b/keyserver/src/responders/user-responders.js
@@ -297,16 +297,19 @@
} = await promiseAll(promises);
if (userResult.length === 0) {
- throw new ServerError('invalid_parameters');
+ if (hasMinCodeVersion(viewer.platformDetails, 171)) {
+ throw new ServerError('invalid_credentials');
+ } else {
+ throw new ServerError('invalid_parameters');
+ }
}
+
const userRow = userResult[0];
+
if (!userRow.hash || !bcrypt.compareSync(request.password, userRow.hash)) {
- if (hasMinCodeVersion(viewer.platformDetails, 99999)) {
- throw new ServerError('invalid_parameters');
- } else {
- throw new ServerError('invalid_credentials');
- }
+ throw new ServerError('invalid_credentials');
}
+
const id = userRow.id.toString();
return await processSuccessfulLogin(viewer, input, id, calendarQuery);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 8:18 AM (21 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2496904
Default Alt Text
D5987.id20515.diff (1013 B)

Event Timeline