Homec4science

Strip port numbers from HTTP host headers before comparing them for cookie…

Authored by epriestley <git@epriestley.com> on Aug 20 2011, 22:55.

Description

Strip port numbers from HTTP host headers before comparing them for cookie purposes

Summary:
Browsers send port numbers (like ":443" or proxy ports) in the Host header and
we'll currently reject them with a message like:

Blah is configured on "x.y.com" but you are accessing it on "x.y.com:443".

Instead, examine only the host part.

Test Plan: Had my local listen on port 81 and accessed Phabricator before/after
the change; it now works without throwing.

Reviewers: jungejason, tuomaspelkonen, aran

Reviewed By: jungejason

CC: aran, epriestley, abdul, jungejason

Differential Revision: 841

Details

Committed
epriestley <git@epriestley.com>Aug 21 2011, 20:47
Pushed
aubortJan 31 2017, 17:16
Parents
rPHc04805cde4a1: Open AphrontWriteGuard for user login
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH57208dfd52c0: Strip port numbers from HTTP host headers before comparing them for cookie… (authored by epriestley <git@epriestley.com>).Aug 21 2011, 20:47