[ZCM] [ZC] 8/ 5 Comment "UserFolder doman spec with wildcards"
Collector: Zope Bugs and Patches ...
zope-coders@zope.org
Thu, 07 Mar 2002 03:46:06 -0500
Issue #8 Update (Comment) "UserFolder doman spec with wildcards"
Status Resolved, Zope/bug+solution medium
To followup, visit:
http://collector.zope.org/Zope/8
==============================================================
= Comment - Entry #5 by htrd on Mar 7, 2002 3:46 am
Waaaaah - I was testing the wrong branch when I thought that andreas patch was flawed. Everything looks good now. Sorry for the confusion.
________________________________________
= Comment - Entry #4 by htrd on Mar 7, 2002 3:34 am
The patch comitted by Andreas in November allows only the first three of the following patterns. I think the fourth one is valid too.
1.1.1.*
1.1.*
1.*
*
I propose:
Index: lib/python/AccessControl/User.py
===================================================================
RCS file: /cvs-repository/Zope/lib/python/AccessControl/User.py,v
retrieving revision 1.168
diff -c -0 -r1.168 User.py
*** lib/python/AccessControl/User.py 1 Mar 2002 20:03:34 -0000 1.168
--- lib/python/AccessControl/User.py 7 Mar 2002 08:34:02 -0000
***************
*** 1100 ****
! addr_match=re.compile(r'((\d{1,3}\.){1,3}\*)|((\d{1,3}\.){3}\d{1,3})').match
--- 1100 ----
! addr_match=re.compile(r'((\d{0,3}\.){1,3}\*)|((\d{1,3}\.){3}\d{1,3})').match
________________________________________
= Resolve - Entry #3 by ajung on Nov 1, 2001 10:19 am
Status: Pending => Resolved
I rewrote all regular expressions and the domainsSpecValidate()
function on my own. The fixes are in the CVS trunk and the
behaviour reflects the explanation in the Zope book.
Andreas Jung
Zope Corportation
________________________________________
= Comment - Entry #2 by htrd on Oct 31, 2001 5:08 am
Andreas asked:
<pre>
> Can you give an example ?
</pre>
>From the Zope book at http://www.zope.org/Members/michel/ZB/Security.dtml:
<pre>
> You can also use IP numbers with asterisks to indicate wild card
> instead of domain names to specify domains. For example,
> "209.67.167.*" will match all IP addresses that start with
> "209.67.167".
</pre>
Im sure the old adminstrators guide documented that it worked with domain names too.
Also, it is also suprisingly useful to be able to specify a match-everything pattern that is simply "*". In the old collector, item 2002 was a patch to add an optimisation for this case, and documentation about *why* it is useful. Brian merged this patch in User.py revision 1.133.2.7.
________________________________________
= Request - Entry #1 by htrd on Oct 30, 2001 5:02 am
Uploaded: "diff"
- http://collector.zope.org/Zope/8/diff/view
UserFolder's domainSpecMatch allows wilcards in its domain specification, but a recent change to domainSpecValidate, which validates user input when changing the domain spec, rejects * characters.
==============================================================