Page MenuHome

Fix ValueError when remote address contains port number
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Aug 18 2020, 2:25 PM.

Details

Summary

When REMOTE_ADDR or HTTP_X_FORWARDED_FOR contains a port number (like 127.0.0.1:44433 or [1234::34]:44433) the preferred currency check would raise a ValueError exception. Removing the port number from such requests resolves this.

Diff Detail

Event Timeline

Sybren A. Stüvel (sybren) requested review of this revision.Aug 18 2020, 2:25 PM
Sybren A. Stüvel (sybren) created this revision.
This revision is now accepted and ready to land.Sep 2 2020, 10:28 AM