threema-ch / threema-web

The Threema Web application.
GNU Affero General Public License v3.0
986 stars 106 forks source link

Bug in Threema URL actions #1116

Closed tobilektri closed 2 years ago

tobilektri commented 2 years ago

Bug Description

This Bug happens on every device, and is not directly a thing of threema web, but it fits best here.

Threema allows to use URL-Actions https://threema.ch/en/faq/url_actions In my case this helps to share content. But there is a bug with sharing text. If you try to share an encoded \r\n you get redirected to the threema homepage.

Steps to Reproduce (for bugs)

  1. Works (Text says bla bla): https://threema.id/compose?text=Bla%20Bla
  2. Does NOT work (Text says bla\r\nbla encoded with javascript encodeURI): https://threema.id/compose?text=Bla%0D%0ABla
  3. Try with WhatsApp. Works (Text says bla bla): https://wa.me/?text=Bla%20Bla
  4. Try with WhatsApp. Works (Text says bla\r\nbla encoded with javascript encodeURI): https://wa.me/?text=Bla%0D%0ABla
  5. In 4. The preview is without line-break, but if you send it there will be a line-break.

Happens not only with CR + LF but also only with LF.

Potential Solution

Must be solved in https://threema.id - if I should contact you anywhere else only tell me.

Your Environment

Irrelevant. Problem is the Webservice.

Edit: This also happens on Android where the URL invokes the App. Should i open an Issue in the Android-App Repo? (respectively the app closes itself if you try to open the link 2. on your mobile device.)

lgrahl commented 2 years ago

I'll forward it, thanks. Next time, if it isn't solely Threema Web, https://threema.ch/support or a Threema message to *SUPPORT would be better. :slightly_smiling_face: