Loading...
 
Skip to main content

Features / Usability


Invalid login lets you see a closed site

I just put up a 3.2 install and I'm running it with the site closed. When you hit http://www.mydomain.comQuestion, you are sent to

http://www.mydomain.com/tiki-error_simple.php?error=go+awayQuestion

and get the login form only, which is exactly what I want. The problem is that you can enter anything in the login and pwd fields and you will be sent to

http://www.mydomain.com/tiki-login.php?page=tikiIndexQuestion

and presented with an error that indicates either a bad username or a bad password (not a good idea to be this specific from a security standpoint) and you can see the index of the site. Nothing is functional and you will be redirected back to

http://www.mydomain.com/tiki-error_simple.php?error=go+awayQuestion

if you click around, but you can still see whatever information shows up on the index. I would like to have a bad login just send you right back to

http://www.mydomain.com/tiki-error_simple.php?error=go+awayQuestion

Is there an easy way to do this?

Well I've fixed the overly-specific login error by changing the messages at lines 354 & 355 in tiki-login.php, I'm still hunting around in the file for where to send bad login users, but it looks to be in there somewhere as well.

Its a hack, but commenting these lines out starting at 366 seems to do the trick:

//$smarty->assign('msg',tra($error));
//$smarty->display('error.tpl');
//exit;

The smart thing to do would be to check if the site is closed in the preferences and handle a failed login appropriately. I may revisit this less hackishly when I get time.