[TextCube] Bug reoprt, reset user password e-mail with incorrect hyper-link.
2008/05/25 16:41 / Technical support/TextCube
views: 2340 times



BUG Report version: TextCube 1.5x, 1.6x, 1.7x
File: /interface/login/index.php
Find and Delete this Line (about line 26):
keep the /lib/auth.php, DO NOT MODIFY IT.
BUG Report version: TextCube 1.5x, 1.6x, 1.7x
File: /lib/auth.php
Find the Line 189:
Fixed like this:
這支 bug 存在很久了,我追朔到 TC 1.5 好像就有了。之前有沒有我不知道,這是在討論區 winne 再問的時候我翻到的,起初我還以為他所謂的初始化密碼是使用者的那一塊,結果不是,反而是在登入登出的認證介面那邊!感謝 winne 讓我挖到這個臭蟲囉!
這個 bug 會讓使用者的重新設定密碼的信件連結錯誤,導致使用者無法正確的從 TC 所寄發的密碼信件正確的連結到部落格中。
我不放檔案,因為每個版本的東西可能不同,就勞請各位自己改一下吧!
File: /interface/login/index.php
Find and Delete this Line (about line 26):
$blogURL = getBlogURL();
keep the /lib/auth.php, DO NOT MODIFY IT.
BUG Report version: TextCube 1.5x, 1.6x, 1.7x
$message = str_replace('[##_link_##]', "$hostURL$blogURL/login?loginid=" . rawurlencode($loginid) . '&password=' . rawurlencode($authtoken) . '&requestURI=' . rawurlencode("$hostURL$blogURL/owner/setting/account?password=" . rawurlencode($password)), $message);
REMOVE THIS: $hostURL$message = str_replace('[##_link_##]',
"$blogURL/login?loginid=" . rawurlencode($loginid) .
'&password=' . rawurlencode($authtoken) . '&requestURI=' .
rawurlencode("$blogURL/owner/setting/account?password=" .
rawurlencode($password)), $message);
這支 bug 存在很久了,我追朔到 TC 1.5 好像就有了。之前有沒有我不知道,這是在討論區 winne 再問的時候我翻到的,起初我還以為他所謂的初始化密碼是使用者的那一塊,結果不是,反而是在登入登出的認證介面那邊!感謝 winne 讓我挖到這個臭蟲囉!
這個 bug 會讓使用者的重新設定密碼的信件連結錯誤,導致使用者無法正確的從 TC 所寄發的密碼信件正確的連結到部落格中。
我不放檔案,因為每個版本的東西可能不同,就勞請各位自己改一下吧!
- Bookmarks
HEMiDEMi
Technorati
Del.icio.us
Digg
funP
Yahoo!
Furl
Trackback URL : http://blog.hinablue.me/trackback/553






Leave your greetings here.
Without $hostURL, link will not contain full URL. $hostURL contains HTTP_HOST and port information. ^^
Thank you for bug reports :D
thanks for your comment.
But I found this link always incorrect in email there:
http://hina.ushiisland.nethttp://hina.ushiisland.net/blog/hinablue/login?loginid=hinablue@msn.com&password=*********************&requestURI=http://hina.ushiisland.nethttp://hina.ushiisland.net/blog/hinablue/owner/setting/account?password%3D*********************
see? the domain name repeat in this link.
$hostURL = http://hina.ushiisland.net
$blogURL = http://hina.ushiisland.net/blog/hinablue
So, if within $hostURL, this link will no work in the e-mail.
BTW, I cannot comment in your guestbook :P
If without $hostURL, the link will correct and work correct like this,
http://hina.ushiisland.net/blog/hinablue/login?loginid=hinablue@msn.com&password=*********************&requestURI=http://hina.ushiisland.net/blog/hinablue/owner/setting/account?password%3D*********************
That's a strange situation. :-( hmm...
Did you force the $service['path'] value at config.php? That situation can happen if $service['path'] is changed by setting. usually that value should look like :
$service['path'] = '/trunk';
$service['path'] = '/tc';
which contains only path information, not full URL information.
Please check it :D
My config.php about path setting is,
$service['path'] = '/blog';
SO, I think the service setting is not a problem about this :P
ok... Can you help me? please add these two lines at /lib/suri.php and tell the results^^
after $folderURL = rtrim($blogURL . $suri['directive'], '/'); (maybe line 143?), add these two lines.
var_dump($hostURL);
var_dump($blogURL);
It's really strange.
I add var_dump($hostURL); and var_dump($blogURL) in suri.php
there show up with this,
string(26) "http://hina.ushiisland.net" string(14) "/blog/hinablue"
BUT, I add these two line in auth.php within function "resetPassword"
about line after 183, there show up with this,
string(26) "http://hina.ushiisland.net" string(40) "http://hina.ushiisland.net/blog/hinablue"
the global variable $hostURL and $blogURL in suri.php is not the same in auth.php ??? WHY ???
AND I used $hostURL and $blogURL in plugin which I made, there are correct and the same in suri.php
Due to your test, I found the problem.
function getBlogURL() is added to support 2nd URL from Textcube 1.6.3. However the routine has some problem. (It does not consider 2nd URL setting, and returns wrong type $blogURL) To fix this, remove
$blogURL = getBlogURL(); (line 26?)
from /interface/login/index.php
Thank you for your help^^
Thanks for your consider with this :D