signalapp / Signal-iOS

A private messenger for iOS.
https://signal.org
GNU Affero General Public License v3.0
10.78k stars 3.02k forks source link

Auto remove tracking elements from shared URLs #5694

Closed pawisoon closed 6 months ago

pawisoon commented 11 months ago

First time contributor checklist

Contributor checklist

Description

As a privacy-oriented user, I would like to have the option to remove tracking elements from URLs pasted / shared by me into my chats.

This PR introduces a feature that removes tracking elements from URL that are pasted or shared using ShareExtension. Removed elements and platforms:

Example

Example of shared URL that has a source identifier "?si=":

https://youtu.be/dQw4w9WgXcQ?si=ZvcTJw_HfIbBdVek

Not tracked URL should look like this:

https://youtu.be/dQw4w9WgXcQ

Feature is optional for user (disabled by default) and can be enabled in App Settings as explained below: App Seettings -> Privacy -> Advanced -> "Remove Tracking Elements"

settings

Testing:

The feature was tested manually by sharing a URL that has a tracking element in it. It was tested in the following 2 scenarios.

Scenario A:

URL stored in clipboard of iOS device is pasted in chat. If setting is enabled and pasted URL contains tracking elements, then its automatically removing trackers and changing URL in text view.

scenario_a

Scenario B:

User attempts to share a URL from within an app e.g. youtube using ShareExtension. If setting is enabled, and shared URL contains tracking elements, then its automatically removing trackers and changing URL in share preview text view.

scenario_b

dhanishgajjar commented 11 months ago

Would love to have this feature 👌🏽

michtesar commented 11 months ago

I like this! Very application should handle links with privacy in mind! Thanks 👍

pawisoon commented 11 months ago

@Miguel-Signal @harry-signal @amy-signal can this be reviewed? :)

RemainingToast commented 11 months ago

This looks good +1

But it should remove the "?" as a qol

pawisoon commented 11 months ago

This looks good +1

But it should remove the "?" as a qol

Thanks for feedback! I pushed change that fixes it 😄

Edit: I also updated GIFs in first comment to present updated functionality.

DGrothe-PhD commented 10 months ago

Perhaps t= shouldn't be removed for youtube links, consider https://youtu.be/x0EYpi38Yp4?t=931 for example. Therein t stands for time to start from.

pawisoon commented 10 months ago

Perhaps t= shouldn't be removed for youtube links, consider https://youtu.be/x0EYpi38Yp4?t=931 for example. Therein t stands for time to start from.

Thank you! It's now fixed to remove "t=" parameter only for Twitter/X hostnames.

pawisoon commented 10 months ago

I'm sorry for pinging multiple people but I don't know who can have a look at my PR? @igor-signal @pete-signal @max-signal @marissa-signal

schmeat commented 10 months ago

@pawisoon For what it's worth, I think this is a great feature and you've done a good job on it. However, I wouldn't expect any interaction from the signal team. There is a graveyard of pull requests with no interaction on this project.

harry-signal commented 10 months ago

We greatly appreciate your effort and that of past contributions on this subject! Please understand, though, that for some sensitive subjects we are unlikely to accept external contributions as-is. That doesn't meant we are ignoring them; your contributions are meaningful and lead to internal discussions that drive our future roadmap, especially for tricky areas like this one.

pawisoon commented 10 months ago

@harry-signal Thank for your reply Harry. Appreciate it :) I really hope this will get merged into Signal app and will make it even more privacy-oriented app for its users.

elcodedocle commented 9 months ago

+1 on this really cool feature!

stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 months ago

This issue has been closed due to inactivity.

pawisoon commented 4 months ago

Dear Signal team, Is there any update on when such feature will be implemented?