Browser Id Manager: Cookie Domain problem with domains containing a hyphen

Bug #1173106 reported by Georg Pfolz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Undecided
Unassigned

Bug Description

When I try to set a cookie-domain that contains a hyphen, I get the error 'Cookie domain must contain at least two dots ' when the string has exactly two dots (it works with three).

The problem lies in the regex in BrowserIdManager.py, line 53:
twodotsin = re.compile('(\w*\.){2,}').search

I suggest changing it to:
twodotsin = re.compile('([-\w]*\.){2,}').search
which works for me

Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.