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

feat: fix SSRF when download avatar #1193

Merged
merged 1 commit into from
Oct 20, 2022
Merged

feat: fix SSRF when download avatar #1193

merged 1 commit into from
Oct 20, 2022

Conversation

leo220yuyaodog
Copy link
Member

@leo220yuyaodog leo220yuyaodog commented Oct 8, 2022

Fix: #1187

Restrict the Intranet ip when download for syncing permanent avatar
Plz review @gregxsunday

@casbin-bot
Copy link
Contributor

@seriouszyx @ComradeProgrammer @Resulte please review

Copy link

@Nash-x9 Nash-x9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, filtering Intranet addresses does reduce the vulnerability damage, but risks still exist. For example, if you use this function to brush the number of clicks and bypass the CDN to obtain the real IP address of the server, the service of downloading profile pictures by the server needs to be sorted out and discussed, rather than simply filtering.

@leo220yuyaodog
Copy link
Member Author

leo220yuyaodog commented Oct 11, 2022

Now fixed by modifying the update-user api do not download the image. And in the frontend, user can just set avatar by uploading photo from local or selecting form resources.

@leo220yuyaodog leo220yuyaodog requested review from Nash-x9 and removed request for seriouszyx, Resulte and ComradeProgrammer October 11, 2022 14:41
@hsluoyz hsluoyz merged commit 6a1ec51 into casdoor:master Oct 20, 2022
@casbin-bot
Copy link
Contributor

🎉 This PR is included in version 1.136.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@leo220yuyaodog leo220yuyaodog deleted the fix_ssrf branch October 24, 2022 06:34
zhaobingchun pushed a commit to zhaobingchun/casdoor that referenced this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Full read SSRF in avatar upload
4 participants