Foren / Cotonti / Bugs / Error in URL during first login

tobto
#1 6. Juli 2012, 15:16

Installed cotonti0.9.10 on MAMP. Try to login as Admin /login.php?a=check - answer: 'Error in URL'. Whats up?

Twiebie
#2 6. Juli 2012, 15:53
URL for the login form should just be /login.php
Trustmaster
#3 6. Juli 2012, 16:04

Does your browser have HTTP_REFERER enabled?

May the Source be with you!
tobto
#4 6. Juli 2012, 17:09

2Twiebie - yes, /login.php
2Trustmaster - HTTP_REFERER enabled.

Just reinstalled package - the same error. I put in admin login/ pass written during registration. Maybe admin email must be confirmed?

Trustmaster
#5 6. Juli 2012, 17:43

No, the email doesn't need confirmation. What does your "main url" setting look like? Did you try other browsers?

May the Source be with you!
tobto
#6 6. Juli 2012, 19:08

mainurl: http://localhost:8888/cotonti0910
FF13.0.1 - error
Safari5.0.6 - error
Chrome20.0.1132.47 - error

Once again. I've installed CMS fast, no problem )
Then when I login to http://localhost:8888/cotonti0910/login.php the page goes to http://localhost:8888/cotonti0910/login.php?a=check with an error message.

Trustmaster
#7 6. Juli 2012, 20:35

This happens because of a custom port (8888) part of the URL. It is a Cotonti bug, so thanks for reporting this! I'll post a fix here as soon as it is done.

May the Source be with you!
tobto
#8 11. Juli 2012, 21:46

eagerly wait

Trustmaster
#9 12. Juli 2012, 11:37

Here is the fix. Open system/common.php at line 564:

		|| ($cfg['referercheck'] && !preg_match('`https?://([^/]+\.)?'.preg_quote($sys['domain'].$sys['site_uri']).'`i', $_SERVER['HTTP_REFERER']))))

replace it with

		|| ($cfg['referercheck'] && !preg_match('`https?://([^/]+\.)?'.preg_quote($sys['domain']).'(/|:|$)`i', $_SERVER['HTTP_REFERER']))))
May the Source be with you!
tobto
#10 13. Juli 2012, 19:04

Working!! Thank you very much! enlightened