Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#1697 closed bug (fixed)

Password retrieval broken

Reported by: globetrotter_tt Owned by: jsfan
Priority: blocker Milestone:
Component: unknown Keywords: password
Cc: planetcruiser, jsfan

Description

Issue:

I think we need another hotfix here.

Change History (8)

comment:1 Changed 6 years ago by mahouni

what exactly isn't working?

when I enter a username and click submit I see this warning (on my local installation):

Warning: preg_match(): Unknown modifier '0' in PATH_TO_BWROX/htdocs/bw/lib/FunctionsTools.php on line 332 

So it seems to be the same issue as we have seen with the pagination. Or it has to do with the change to the utf usernames, e.g. when the link is created with the username in line 492 of that FunctionsTools?.php.

comment:2 Changed 6 years ago by globetrotter_tt

When i use it on the live site with my username matthias

i see:

Sorry no valid email for


On alpha i see additionally the same warning as above

comment:3 Changed 6 years ago by globetrotter_tt

i wonder if we can just use this instead of preg_match() in bw/lib/FunctionsTools.php

if(filter_var($email,FILTER_VALIDATE_EMAIL) === false)
{
   return (false);
}
else
{
   return (true);
}

comment:4 Changed 6 years ago by jsfan

Another one of my PHP 5.3 fixes gone wrong. :( There were just too many of these to never overlook anything. The problem are the unescaped slashes in the regexp. However, the regexp is no good (it should really be the one shown at http://ex-parrot.com/~pdw/Mail-RFC822-Address.html ). So, I'll implement what globetrotter_tt suggested and use the PHP filter trusting that it implements the RFC well.

comment:5 Changed 6 years ago by jsfan

  • Owner set to jsfan
  • Status changed from new to assigned

comment:6 Changed 6 years ago by jsfan

Hotfix (90d3671) is checked in and master deployed. My tests look good but maybe someone else could confirm and close.

I reviewed my PHP 5.3 patch and found another regexp problem in htdocs/bw/layout/admingrep.php which I fixed along with this even though I'm not sure if that code is still used.

comment:7 Changed 6 years ago by globetrotter_tt

  • Resolution set to fixed
  • Status changed from assigned to closed

I have tested the fix on alpha and production and confirm that it works. Thanks for the quick reaction :)

comment:8 Changed 6 years ago by globetrotter_tt

Oh and of course we should finally write a new password retrieval page. We still use /bw code for this.

Note: See TracTickets for help on using tickets.