Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3364777
D13588.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
924 B
Referenced Files
None
Subscribers
None
D13588.diff
View Options
diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js
--- a/keyserver/src/responders/website-responders.js
+++ b/keyserver/src/responders/website-responders.js
@@ -207,7 +207,7 @@
const { secret } = req.params;
const userAgent = req.get('User-Agent');
const detectionResult = detectBrowser(userAgent);
- if (detectionResult.os === 'Android OS') {
+ if (detectionResult?.os === 'Android OS') {
const isSecretValid = inviteSecretRegex.test(secret);
const referrer = isSecretValid
? `&referrer=${encodeURIComponent(`utm_source=invite/${secret}`)}`
@@ -218,7 +218,7 @@
});
res.end();
return;
- } else if (detectionResult.os !== 'iOS') {
+ } else if (detectionResult?.os !== 'iOS') {
const urlFacts = getWebAppURLFacts();
const baseDomain = urlFacts?.baseDomain ?? '';
const basePath = urlFacts?.basePath ?? '/';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 5:09 AM (20 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583037
Default Alt Text
D13588.diff (924 B)
Attached To
Mode
D13588: [keyserver] Handle null browser detection result
Attached
Detach File
Event Timeline
Log In to Comment