Skip to content
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

Make avatar_url unguessable #6346

Merged
merged 3 commits into from
May 17, 2024
Merged

Conversation

vtran99
Copy link
Contributor

@vtran99 vtran99 commented May 17, 2024

Request to modify avatar_url to make it unguessable as with the current '/user//picture-default'
it's too easy for anyone to access other user's profile picture by changing randomly number.

Notes:
This change breaks the tests on users as dataset used contain static value of 'avatar_url' which can't be set with the change.
What I can do is:

  • either remove avatar_url from the tests;
  • either set a fake value inside the test to match the value in the dataset;
  • other suggestion ?

@ThiefMaster
Copy link
Member

I did a few cleanups and also added mocking the serializer so the URLs do not change between test runs.

@ThiefMaster ThiefMaster added this to the v3.3 milestone May 17, 2024
- Changelog entry
- Keep original slug (it's a cache buster)
- Better typing for secure serializers
@ThiefMaster ThiefMaster enabled auto-merge (squash) May 17, 2024 11:17
@ThiefMaster ThiefMaster merged commit b226ff8 into indico:master May 17, 2024
9 checks passed
@ThiefMaster ThiefMaster deleted the Modify_avatar_url branch May 17, 2024 11:22
@ThiefMaster
Copy link
Member

ThiefMaster commented May 17, 2024

@vtran99 When backporting this to your fork, make sure to also apply this commit fixing a bug I only discovered after merging the PR: da634d3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants