#9348 closed enhancement (fixed)
Authz does not handle titles with umlauts
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | high | Milestone: | 0.12 |
Component: | general | Version: | |
Severity: | normal | Keywords: | unicode authzpolicy |
Cc: | leho@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Rules like this won't work:
[wiki:ProtokollFünf@4] @members = WIKI_VIEW * =
while rules like this will:
[wiki:ProtokollFuenf@4] @members = WIKI_VIEW * =
(Given that corresponding pages exist.)
Attachments (0)
Change History (8)
comment:1 by , 15 years ago
Milestone: | → unscheduled |
---|
comment:2 by , 15 years ago
Cc: | added |
---|
follow-up: 4 comment:3 by , 15 years ago
Keywords: | unicode authzpolicy added; utf8 authz FineGrainedPermissions removed |
---|---|
Milestone: | unscheduled → 0.12 |
Owner: | set to |
Priority: | normal → high |
The problem is that we simply don't convert the utf-8 str
to unicode
.
Would be wonderful to add unit-tests one day for the authzpolicy tickets ;-)
follow-up: 6 comment:4 by , 15 years ago
Replying to cboos:
Would be wonderful to add unit-tests one day for the authzpolicy tickets ;-)
… in addition to refactoring the whole thing to simplify parsing and checking, and in the process, improve its performance. By using a few big regexes, for example.
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r9710, doc updated in TracFineGrainedPermissions@18.
follow-up: 7 comment:6 by , 15 years ago
Replying to rblank:
Replying to cboos:
Would be wonderful to add unit-tests one day for the authzpolicy tickets ;-)
… in addition to refactoring the whole thing to simplify parsing and checking, and in the process, improve its performance. By using a few big regexes, for example.
He, you were not supposed to be looking, today ;-)
While I was doing the fix, I thought that we could already speed it up by having a per-user cache (user → authz_permissions
→ expand_actions
), filled progressively for each new user checked and invalidated at the next parse_authz
. That would already make the thing more usable, without the need for a full rewrite.
comment:7 by , 15 years ago
Replying to cboos:
That would already make the thing more usable, without the need for a full rewrite.
Note that I wrote "refactor", not "rewrite" ;-)
The reason I suggested a major refactoring is the experience gained from svn_authz.py
. It turned out that it was simpler and more correct to just parse the file "by hand" and store it into an adequate data structure, rather than using ConfigParser
and looking up in its sections. I suspect the same to be true for authz_policy.py
.
Also, removing the logging statements may also improve performance.
I assume your authz file is utf-8 encoded?
This may be due to an issue with
fnmatch
, which is used byauthz_policy.py
.