Edgewall Software

Ticket #5097 (new defect)

Opened 21 months ago

Last modified 13 months ago

authz gives "Permission Denied" when viewing empty changeset

Reported by: jander@… Owned by: cboos
Priority: normal Milestone: 0.13
Component: version control Version: 0.10.3
Severity: normal Keywords: svn_authz verify
Cc:

Description

If authz is enabled, trying to view an empty changeset will result in a "Permission Denied" error. Discovered in 0.10.3; inspection suggests the same bug currently exists in the trunk.

Suggested fix, in versioncontrol/svn_authz.py (there's probably a prettier way to do this):

     def has_permission_for_changeset(self, rev):
+        seen_change = 0
         changeset = self.repos.get_changeset(rev)
         for path,_,_,_,_ in changeset.get_changes():
+            seen_change = 1
             if self.has_permission(path):
                 return 1
+        if seen_change == 0:
+            return 1
         return 0

Attachments

Change History

follow-up: ↓ 2   Changed 16 months ago by sid

  • version changed from devel to 0.10.3

In the path you have, 1 will always be the returned value. That doesn't seem quite right...

in reply to: ↑ 1   Changed 16 months ago by anonymous

Replying to sid:

In the path you have, 1 will always be the returned value. That doesn't seem quite right...

Hm, so it will. I wasn't expecting get_changes() to weed out unauthorized paths. In that case, I retract my quick fix.

  Changed 15 months ago by hyuga <hyugaricdeau@…>

I'm pretty sure there's already a ticket for this, but I can't find it. Also, I'm pretty sure this has been fixed, but I'm not positive.

  Changed 13 months ago by cboos

  • keywords svn_authz verify added
  • milestone set to 0.12

Add/Change #5097 (authz gives "Permission Denied" when viewing empty changeset)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from cboos. Next status will be 'new'
The owner will change from cboos to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.