Closed (fixed)
Project:
Path Access
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Support request
Assigned:
Reporter:
Created:
6 Jan 2011 at 08:01 UTC
Updated:
25 May 2011 at 12:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
korgx commentedpatterns are without quotes
Comment #2
korgx commentedHi all,
I found a potential problem in code of access_path module.
For example if my URL is www.anysite.any/any_page/
if I specify restriction to www.anysite.any/any_page/ it doesn't work
an also does not work for these:
*/any_page/*
*/any_page/
*/any_page
Notice, in readme and online it says that the patterns above are correct, but in reality it works only if I specify this
*any_page*
But then can cause a problem with links like:
www.anysite.any/first_any_page_module
www.anysite.any/any_page_bla_bla/
in order to fix this possibly wrong behavior I added few lines code producing the expected behavior from path_access. See my previous comment.
if ($pages) {
// The current page.
global $base_root;
$path = $base_root . request_uri();
//drupal_get_path_alias(check_plain($_GET['q'])); this line returns only current
I will shortly submit a patch.
Notice also, that blocking some path may create problems to some core/important modules like bitcache. So, I was wondering
if it would be worth having rules to automatically handle these important modules (i.e. exceptions or default setting to disable
path access but not other core functions).
Comment #3
korgx commentedThis is a patch
Comment #4
xurizaemonYou don't need to use the absolute URL (path access rightly assumes you want to protect a page on your own website, not someone else's).
You don't want to use a preceding or trailing slash (just use the URL as drupal sees it, which you can probably copy from your browser addressbar).
The patterns you want to use are
You said,
If those docs are on Drupal.org, you should be able to update the documentation yourself. You can also provide a patch to the README.txt, although I can't see those patterns in the README I have here.
Comment #6
astro87 commentedThis patch helped me, thanks a lot !