Moodle

session->wantsurl not set if the first thing you hit on a site is through file.php

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.5
  • Fix Version/s: None
  • Component/s: Authentication
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

Here's how to reproduce...

1. go to any image on your site and copy it's url
2. log out of your site and kill all cookies.
3. paste the image url into your browser

What happens is that you just end up at your site's home page.

This is because require_login is being called from file.php - because you've got no guest access set up yet.

But as of MDL-14495 an extra parameter was added so require_login here didn't maintain $SESSION->wantsurl.

I'd be tempted to switch back to the original code, but suspect the original bug is worse than this one. The trouble is that some of my users have a nasty tendancy to copy urls of uploaded assets in emails. I'd like to be able to support that use, but I'm not entirely sure what to do.

Suggestions please?

Activity

Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: