-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check for Content-Type when downloading tracker list #22137
base: master
Are you sure you want to change the base?
Add check for Content-Type when downloading tracker list #22137
Conversation
Check if the URL from where we are downloading the trackers returns `Content-Type` as `text`. Otherwise consider it might be a non-usable format for this functionality (html,xml,etc.ect.)
The plain text may also contain arbitrary/inappropriate data. Shouldn't the lines themselves be validated instead? |
I thought that the text area was meant to be used in order to "preview" the url's a user was about to add. |
…r-list-content-type-check-13061
Tested! |
Closes #13061.
Description
Some users might get confused around platforms like github and their
raw
links. By mistake such user has entered the HTML page link and each HTML line was taken as a tracker.In order to fix this issue, we add a check on the
Content-Type
header of the response. We accepttext/plain
and show a descriptive error message otherwise.