fief-dev / fief

Users and authentication management SaaS
https://www.fief.dev
Other
488 stars 42 forks source link

Whitelist redirect urls whose host ips are within private network ranges #151

Closed zfei closed 1 year ago

zfei commented 1 year ago

According to the IANA specifications referenced in the documentation of the official ipaddress library, the private network IP ranges seems to be well defined are shall be recognized across protocols.

Please let me know if this doesn't feel right.

frankie567 commented 1 year ago

~I like the approach, but I don't it'll work like this since host contains also the http:// scheme.~

EDIT: Never mind, you're right, I'm wrong, sorry 😅

frankie567 commented 1 year ago

@all-contributors add @zfei for code

allcontributors[bot] commented 1 year ago

@frankie567

I've put up a pull request to add @zfei! :tada:

zfei commented 1 year ago

Awesome, thanks!

zfei commented 1 year ago

Hmm, while git-blaming previous commits, looks like there are some other sites where ips are checked. @frankie567, do we need to change these as well?

frankie567 commented 1 year ago

@zfei No, that's an old commit where we had this duplication, but now everything is factorized into is_localhost (since https://github.com/fief-dev/fief/commit/f7293a8aace17ed3d3a8c09e21cae1a23fb45405 — with totally unrelated changes 😅 —). But thank you for your vigilance 😄

zfei commented 1 year ago

Btw, when can we expect the change to go to prod (fief cloud)?

frankie567 commented 1 year ago

Today 😄 New release is building!