YAFLogo

Gallowglas
  • Gallowglas
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Hi there,

We have our forums up and (mostly) functional. However, one problem seems to be lingering and I cannot figure out what is wrong. Specifically, when I click the "lost password" button on the login page, it simply redirects back to the login screen instead of the recover password interface that I would expect.

Any ideas?

Sponsor
Gallowglas
  • Gallowglas
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Incidentally, I should provide that I am running the latest release of the forum software (1.9.4).
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago
My thought is that it's a Url Rewriting issue. Do you have UrlRewriting turned on on your forum? If so, turn it off and see if that helps.
Gallowglas
  • Gallowglas
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago

My thought is that it's a Url Rewriting issue. Do you have UrlRewriting turned on on your forum? If so, turn it off and see if that helps.

Jaben wrote:

I believe it's set to not use url rewriting by default in app.config, correct? If that setting is being implemented, then it is currently turned off.

Gallowglas
  • Gallowglas
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Ok, we found the problem. However, I am a little puzzled about the intent. Apparently password recovery is disabled (and issues an "access denied" ) if forum registration is disabled. I am uncertain why one would be unable to recover their password just because registrations aren't allowed for the general public.

Here's the specific bit of code in PageSecurityModel.cs that disallows it:

// handle security features...
      switch (ForumPageType)
      {
        case ForumPages.recoverpassword:
          if (PageContext.BoardSettings.DisableRegistrations)
          {
            //problem code below
            YafBuildLink.AccessDenied();
          }

          break;
        default:
          if (PageContext.IsPrivate && CurrentForumPage.User == null)
          {
            // register users only...
            CurrentForumPage.RedirectNoAccess();
          }

          break;
      }

So what we did is short circuit this by adding the recover password page reference to the following line:

if (ForumPageType == ForumPages.login || ForumPageType == ForumPages.approve || ForumPageType == ForumPages.logout || ForumPageType == ForumPages.recoverpassword)
      {
        return;
      }
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago
Agreed. Fixed.
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago
I think it was just a typo... should have been "register" page... no forgot password.
Gallowglas
  • Gallowglas
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Ok, good to know. Glad we could help track it down! 🙂
kavit
  • kavit
  • 51.8% (Neutral)
  • YAF Forumling
13 years ago
But Whats the solution for YAF 1.9.4 because Lost Passworking in 1.9.5 i dont want to upgrade to 1.9.5 so please tell me solution fast as posible