Closed (outdated)
Project:
Redirect
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2013 at 12:22 UTC
Updated:
20 May 2025 at 21:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rolodmonkey commentedThis is something I would also like to see.
Comment #2
rtdean93 commentedI also would like to see this.
I propose adding a new permission for the Settings page. Patch to follow...
Comment #3
rtdean93 commentedPatch is attached...
Comment #4
charles belov+1
Comment #5
charles belovUpdating title
Comment #6
charles belovUpdating the beginning hash in the patch from #3 and setting Needs Review in an attempt to trigger the tester.
I'll note the patch does not include the /404 request. I agree that this is a separate request for scope control.
Comment #8
charles belovActually, there is a potential security issue for anyone who applies the patch in #3/#6 prior to it being committed to the module.
It would be better to redo this code such that the less-dangerous permission were the added one. That way, if we suddenly had to lose the patch due to a security upgrade to the Redirect module, only the more-dangerous setting would remain in effect.
That is:
Current system: Only Admin has permission 'administer redirects'
With #3/#6 patch:
Admin and trusted non-admins get assigned permission 'administer redirects'
Admin gets assigned new permission 'administer redirect settings'
If we have to back out the patch for a security update to the Redirect module, we are left with:
Admin and trusted non-admins have permission 'administer redirects', which includes access to settings. (security issue)
With proposed patch (not posted yet):
Admin continues to have permission 'administer redirects'
Admin and trusted non-admins get assigned permission 'add edit or delete redirects'
If we have to back out the patch for a security update to the Redirect module, we are left with: Only Admin has permission 'administer redirects', which includes acces to settings. (no security issue)
I realize that's more coding, which I don't have time to do now or I'd post an updated patch, but it's much more secure. In addition, the scope of both permissions would be more accurate.
Comment #9
dasginganinjaThe separation of these permissions is something that ultimately needs to be done. Users should be able to add redirects and admins should be able to administer the roles without the permissions overlap.
The current permissions are set to "administer redirects". Ultimately these permissions should only be used for the settings page. I agree with above that it is an unintended security flaw by doing it this way. One could always supply a
hook_update()function to convert the old permission to the newly created one "add/edit/delete redirections". This seems to make the most sense to me at least. Now if I could just find the time to write a patch...Comment #10
interdruper commentedUntil this issue will be fixed, this snippet may be useful for someone:
Comment #11
chaseonthewebRe-roll of #6 against 1.0-rc4.
Regarding the perceived security issue, this presumes that:
Applying a patch is an inherently "use at your own risk" choice, though it's good to make people aware of a gotcha if they choose to revert the patch.
Comment #13
wylbur commentedClosing this as Outdated as Drupal 7 is EOL.