I just updated the Forward Module on my site, due to the security alert.

I ran update.php, apparently successfully, but I have two problems:

1) the forward links won't show on my home page.

2) they do show on the node pages, but when I click on them I get an access denied message.

I've done the normal stuff--checked the access permissions, made sure the module settings were right, etc. Nothing seems to make a difference.

Thanks for any help on this,

-Ken

CommentFileSizeAuthor
#28 forward_nocache.diff2.47 KBgeodaniel

Comments

Ken Watts’s picture

Priority: Critical » Normal

I just discovered that the access denied problem is only happening when I am logged in, either as a normal user or as admin.

Visitors can use the link fine, though it still doesn't appear on the main page.

seanr’s picture

Are you using the node_access module? Do you have the permissions set so that authenticated users can access both forward and the node in question?

cardsup’s picture

Hi, I have the same problem. I am using the simple_access module, and I have checked the permissions. FOr some reason the forward function works only for anonymous users, but when one is logged in, the message is "Access denied"

seanr’s picture

Title: Forward Module Updated - Lost first page links and denied access » Access control check fails in 4.7

More accurate title.

Also, following bugs have been marked as duplicates of this:
http://drupal.org/node/160367
http://drupal.org/node/159818

Ken Watts’s picture

It's started happening for anonymous users again. I'm not using the node access module, if that's the name that would show up on the module page.

skyl1ne’s picture

[quote]I'm not using the node access module, if that's the name that would show up on the module page.[/quote]

The node access module will be found in your MySQL database tables listing.

Also, after repeated install/re-installs of both the new and old modules, I too have been unable to get the Forward module to work correctly or consistently in 4.71 with the node access module.

seanr’s picture

Please do me a favor and try resetting Drupal's menu cache. There are two ways to do this: either download and install the devel module (which gives you a handy "empty cache" link in its block, or just go to the menu page (administer->menus) which automatically resets the menu cache. Then go to the node and try the Forward link again.

jhorton’s picture

Just flagging that this is happening on a site I am running for anonymous browsers. Clicking on the "email this page" link takes the browser to the "You don't have Permission to access that page" page. I have had to deactivate the module for the moment.

skyl1ne’s picture

I reset Drupal's menu cache. It worked for anonymous user, but failed for registered user.

seanr’s picture

Can either of you give me admin access to your site so I can better debug it? Please email me at seanr@ngpsoftware.com

skyl1ne’s picture

Admin access info sent.

geodaniel’s picture

We're also seeing this issue. We have Organic Groups set up on the site, and there is no anonymous access available. The forward page doesn't seem to be working for any users.

seanr’s picture

Category: bug » support
Status: Active » Fixed

Visit the administer->menus page and it should start working. That page clears Drupal's menu cache when you load it.

geodaniel’s picture

Sorry, I should have mentioned before, but I tried that out and it didn't seem to help. I've just tried it again now however, and it's working. Very strange. I'll keep an eye on the situation.

mparas’s picture

This doesn't seem to fix things for me. Even my admin account gets "access denied." Strangely though, if I add a new role with no permissions set, it works with my admin account when I set that role. It does not work when I do this with my other accounts.

seanr’s picture

Can you install the devel module, enable it's block, click empty cache, and then try again? If that doesn't work, please email me at the address I posted earlier in this thread.

mparas’s picture

The empty cache seemed to work, but not on all accounts.

Unfortunately, I'm running this on my machine at work. Thanks for your help anyway!

inteja’s picture

Status: Fixed » Active

Visiting menu page and clear cache using devel module did not work for me. Any other ideas?

seanr’s picture

BrianH - what access control modules are you using? Anything like taxonomy_access, or node_access, etc?

bill18’s picture

I have the same problem, and am not using anything like taxonomy_access, or node_access,

demian’s picture

Same here. drupal 4.7.7 and simple_access module. simple access deactivated and "access denied" persists. Sometimes after several "enables/disables" and "permission check/uncheck" it works for a while... but for a while.

demian’s picture

the clear menus cache works

geodaniel’s picture

We're still having problems with this too, with OG module and its access controls enabled. I've been trying to dig into it a little more...

I have tried switched to a test user ('UserA', no roles) using the masquerade module, tried to access a 'forward' page and got the access denied message. As I switch back to my own account I notice it's also doing it for me. I have accessed the 'admin -> menus' page as noted above and returning to the node forward page, I still do not have access, but if I switch back to UserA, they do have access. UserB (with same roles as myself) also tells me she has access, as does UserC (same roles).

I'm not seeing logic in this, unless it's not clearing the menu cache for myself, but it is for others. To test this out, I'm going to log in as admin user (uid 1) and try it. Admin user gets access denied for that forward page. After visiting the administer menus page, they still get access denied to the forward page.

Logging out of the site and logging back in as myself, it still does not work. Reportedly it has also stopped working for UserB and UserC though it still works for UserA.

It seems that visiting the menu page clears the cache and makes it work for users with no roles but it doesn't (always) help users with roles assigned to them (though it did help people other than me with roles, until I cleared the cache again as uid 1).

demian’s picture

you are right, the clear menu cache works only for a while. I also noticed that if you disable drupal cache access is granted again.

demian’s picture

what about that solution?

forward.module - line 39 - set $access = false; to true

sorry for that slipshod tip, too tired. I think it will work for the time. (maybe)

asanvicente’s picture

I tried the fixes mentioned previously here, but this is what worked for me:

In forward.module (v 1.11.24), I reverted line 49:

    'access'   => $access,

back to what it was in v.1.11.22:

    'access'   => (user_access('access content')),

now it works again!

Thanks

seanr’s picture

While that may indeed work, that is not an acceptable solution because it bypasses the node_access check, which was the subject of a security advisory a few weeks ago (and the reason this got broken in the first place). Unfortunately, we need to figure out how to get node_access working, not just skip past it.

geodaniel’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new2.47 KB

This patch should stop the Forward module menu items being cached... it seems to help me out, but as the problem is sort of intermittent, it's difficult to test fully. How does it work out for other people?

seanr’s picture

Just committed a variation of this. Please let me know if it helps.

geodaniel’s picture

Status: Needs review » Fixed

Thanks - this is working again now.

seanr’s picture

Awesome, thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.