Commit Graph

47 Commits

Author SHA1 Message Date
Jakub Sokołowski cadf83ef96
fix QR codes on Android, don't use status-im://
Since the meta property and button already has `status-im://` hardcoded
we can just use proper `https://` URL for QR codes and Open Graph meta.

Fixes:
https://github.com/status-im/status-react/issues/12344
https://github.com/status-im/universal-links-handler/issues/59

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-07-23 12:50:51 +02:00
Jakub Sokołowski a4a6be17ed redirect when group chat link is broken due to # character
For more details see:
https://github.com/status-im/status-react/issues/12025

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-04-23 10:42:16 +02:00
Jakub Sokołowski 5e2806662c allow indexing for public chats and browser links
Disables indexing for users and groups chats using robot meta tag.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-01-12 17:33:40 +01:00
Jinho Jang 6c95d11bfe
Add twitter preview
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-01-07 20:17:38 +01:00
Jakub Sokołowski 33bc461ca2 verify QR data starts with a valid URL
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-11-19 17:51:20 +01:00
Jakub Sokołowski c1d095a3f8 add Open Graph metadata, including image, to index
This will allow for image unfurling on Facebook/Twitter.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-11-19 17:51:20 +01:00
Jakub Sokołowski 9386b6e0eb add /qr path and use it for generating SVG qr code
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-11-19 17:51:20 +01:00
Jakub Sokołowski 7f1621f669 redirect upper case chat keys to lower case
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-01 15:28:10 +02:00
Jakub Sokołowski 2ad999ff51 use originalUrl for path in chat key route
This resolves issue with invite arguments not showing up in QR:
https://github.com/status-im/universal-links-handler/issues/50

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-01 15:28:10 +02:00
Jakub Sokołowski 5fd8dd2466 add support for private groups at /g/
The code checks for:
- Presence of all three URL arguments: `a`, `a1`, `a2`
- Verifies that `a`(admin key...) is 132 characters long
- Verifies that `a2`(chat key...) is 169 characters long
- Verifies that `a1` does not contain HTML before rendering

Each case is tested, including the valid one.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-29 17:15:24 +02:00
Jakub Sokołowski 550e73bec0 use join.status.im domain when in development mode
This fixes issue with QR code not working in the app.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-29 17:15:24 +02:00
Jakub Sokołowski cd79e2a057 fix public key styling by truncating
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-27 13:38:10 +02:00
Jakub Sokołowski ed2307cf18 add support for compressed secp256k1 keys encoded with base58btc
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-07 17:29:20 +02:00
Jakub Sokołowski b4d7daf379 detect XSS attacks using is-html package
The isValidUrl method is using `idna-uts46-hx` to catch malformed domain
names and `is-html` to identify HTML elements in the URL.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-09 17:03:43 +02:00
Jakub Sokołowski e5bf39d23a add a redirect page warning user about possible attack
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-03 14:21:04 +02:00
Jakub Sokołowski 951c6723ee drop @ from user path because iOS removes it
iOS is fucking retarded and removes @ from deep links.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-01 15:50:00 +02:00
Jakub Sokołowski 39d7cdb890
redirect legacy uppercase channel names too
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-24 13:28:33 +01:00
Jakub Sokołowski 791989788f implement passing URL args to PlayStore
changes:
- Makes the Open in Status button trigger redirectToAppOrStore() JS method on click
- redirectToAppOrStore() redirects to a status-im:// deep link and Play/App store after 500 ms
- The redirect to Play Store includes the referrer URL argument with additional arguments
- The additional arguments include out, invite, and cid, necessary for starter packs

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-20 16:05:47 +01:00
Jakub Sokołowski ed6d320ccf redirect uppercase channel names to lowercase
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-12 10:17:05 +01:00
Jakub Sokołowski 9c4a67e1ea
use orignal URL to make old user links work
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-06 18:01:54 +01:00
Jakub Sokołowski 54af2a13d2 fix status-im:// URLs for Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-28 16:03:13 +01:00
Jakub Sokołowski 0a8fe19418 show error on incorrect length chat key
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-26 10:16:51 +01:00
Jakub Sokołowski e5d3ed7036 show errors for upper case ens names and public chats
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-26 10:16:51 +01:00
Jakub Sokołowski 45d958e81a fix order of route parsing
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-26 10:16:51 +01:00
Jakub Sokołowski f64bcb5f3f handle malformed URLs, display error
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-26 10:16:51 +01:00
Jakub Sokołowski dd429398d4 use utx46 and univeil to avoid phishing
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-26 10:16:51 +01:00
Jakub Sokołowski bd8b46e4fd add support for shorter URLs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-26 10:16:51 +01:00
Jakub Sokołowski 042a91e436 use status-im:// URI scheme in QR codes
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-20 23:11:49 +01:00
Jakub Sokołowski 7a1a8d2db7 drop /extension path, extensions are deprecated
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-20 23:11:49 +01:00
Jakub Sokołowski d689e123dd make button show 'Open in Status' on Android
And use the status-im:// URL scheme for the button.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-20 15:23:23 +01:00
Jakub Sokołowski d94bfc7a4b display QR code for public chat name
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-12 22:33:32 +01:00
Jakub Sokołowski e2c49346c7 use js-status-chat-key lib to display chat name from chat key
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-02-11 16:36:47 +01:00
Nistor Cristian 9d82580da7 Remove unused js files. Change title with id on view.
Signed-off-by: Nistor Cristian <contact@nistorcristian.com>
2020-02-10 20:53:13 +01:00
Dylan Wilson 2307a00578 Add route for extension links
See status-im/status-react#6199
2018-12-03 10:03:21 +01:00
Noman 1b66c7e92b Add QR code for user URLs 2018-10-05 08:46:36 +02:00
Igor Mandrigin 562d91c4c3
Remove 's so it is easier to copy-paste the address 2018-10-04 09:37:54 +02:00
Chad 0a86450317 Use Testflight public links instead of Fastlane signup page 2018-09-26 19:55:22 +02:00
Andrea Maria Piana 694cb56d36 Allow slashes in browse url 2018-07-05 11:29:09 +02:00
Noman f47f5065e7
Merge master 2018-07-03 02:47:34 -04:00
Noman c15c669728
First pass at styling 2018-07-03 02:26:25 -04:00
Andrea Maria Piana 12bf0e742f dont cache redirects 2018-07-03 07:56:55 +02:00
Andrea Maria Piana 6cbf45843a redirect only on root 2018-07-02 20:48:58 +02:00
Andrea Maria Piana 227a1e8b27 Redirect server side 2018-07-02 15:07:30 +02:00
Andrea Maria Piana b973007e42 Add apple association site 2018-06-28 22:11:52 +02:00
Andrea Maria Piana da11b8a3a9 Add healthcheck endpoint 2018-06-28 13:15:58 +02:00
Andrea Maria Piana fe86281cf8 add browse support 2018-06-28 09:27:15 +02:00
Andrea Maria Piana 155354c588 Move to express as we need a bit more finess 2018-06-28 08:59:27 +02:00