Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#9348 closed enhancement (fixed)

Authz does not handle titles with umlauts

Reported by: Bengt.Lueers@… 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 Remy Blank, 15 years ago

Milestone: unscheduled

I assume your authz file is utf-8 encoded?

This may be due to an issue with fnmatch, which is used by authz_policy.py.

comment:2 by lkraav <leho@…>, 15 years ago

Cc: leho@… added

comment:3 by Christian Boos, 15 years ago

Keywords: unicode authzpolicy added; utf8 authz FineGrainedPermissions removed
Milestone: unscheduled0.12
Owner: set to Christian Boos
Priority: normalhigh

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 ;-)

in reply to:  3 ; comment:4 by Remy Blank, 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 Christian Boos, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r9710, doc updated in TracFineGrainedPermissions@18.

in reply to:  4 ; comment:6 by Christian Boos, 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_permissionsexpand_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.

in reply to:  6 comment:7 by Remy Blank, 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.

Last edited 15 years ago by Remy Blank (previous) (diff)

comment:8 by Bengt.Lueers@…, 15 years ago

Works now, thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.