PEAK XOOPS - auto-login hacked files for XOOPS 2.0.9.3 in englishin japanese






Main : XOOPS Hacks : 

Category: XOOPS Hacks          
Download Now! auto-login hacked files for XOOPS 2.0.9.3 Popular Version: 2.0.9.3-v2
Submitted Date:  2005/6/28
Description:

●XOOPS 2.0.9.x用のオートログインハック(+α)済みコアファイルパック (V2)

セキュリティホールのパッチも含んでいます: include/checklogin.php と include/common.php を再度上書きしてください

--------------------------------------------------

XOOPS 2.0.9.x (2.0.9から2.0.9.3まで)に自動ログイン機能を付与するためのパッチです。
このアーカイブ内に含まれる全ファイルを、お使いのXOOPS 2.0.9.x に上書きすることで、自動ログイン機能が有効になります。(実際には上書き後に、システムモジュールをアップデートするか、ログインブロックのテンプレートを編集する必要があります)

オートログインV2で、リトライ機能がつきました。従来のオートログインHackでは、CSRF対策のために、いきなりコンテンツにアクセスするとトップに飛ばされることが多くありましたが、今はいったんsession_confirm.phpにリダイレクトしてから、元の場所に戻ります。

このsession_confirm.phpがV2で増えたファイルです。忘れずにアップロードしてください。

また、何か投稿した時にセッションが時間切れで、投稿内容をロストした、という経験をお持ちの方も少なくないと思いますが、このオートログインV2を有効にしているユーザであれば、再度自動ログインして、直後に再投稿の機会が与えられます。(V2の目玉機能)


このHackは、unameとmd5ハッシュ済のパスワードをクッキーに保存するのですが、その有効時間は、デフォルトで1週間(604800)となっています。

もし、この値を変更したい場合は、mainfile.php に対して下のように1行追加して下さい。

define('XOOPS_AUTOLOGIN_LIFETIME',2678400);

この行は少なくとも、include XOOPS_ROOT_PATH."/include/common.php"; と書かれた行より上にある必要があります。

また、言語ファイル (langage/japanese/global.php) に手を入れている方は、このファイルを上書きするのではなく、ご自身で書き換えてください。


define('_USERNAME','ユーザID または e-mail: '); // 書き換え



define('_REMEMBERME','IDとパスワードを記憶'); // 追加
define('_RETRYPOST','時間切れでした。再投稿しますか?'); // 追加



これは重要な注意点ですが、クッキーにログイン情報が残っているということは、当然、誰かに盗まれる可能性があります。共用コンピュータなどをご利用の際には、必ずログアウトしてから終了するようにアナウンスする必要があるでしょう。


実は、2.0.4以降、onokazuさんが私の自動ログインHackをコメントアウトした状態で取り込んでくれているのですが、このコードはあまり推奨できません。その理由は、クッキーの衝突とCSRF攻撃への耐性です。

2.0.6以降のオートログインHackでは、CSRF対策のために、クエリのついたURLにいきなり自動ログインしてきた時には、ホームページに強制リダイレクトします。ちょっと驚くかも知れませんが、そういうものだと理解してください。

また、従前の自動ログインHackでは、自動ログインの有効期限として、session_expireの値を流用していましたが、こうしてしまうと、カスタムセッション機能が事実上使えなくなってしまうため、XOOPS_AUTOLOGIN_LIFETIME という定数で指定する方式に改めました。


それと、このアーカイブを上書きすると、emailアドレスでもログインできるHackも自動的に有効になります。
これだけ書くと、RyujiさんのemailLoginHackと同じじゃないか、と思われそうですが、あそこまできちんと作っていません。ユーザー名として送られてきた文字列に、@ が含まれていれば、email によるログインだと推定してログインを試す、というだけのHackです。

逆に言えば、その分、Hack箇所も少なくて済んでいます。基本的には、include/checklogin.php だけの変更ですので、コアバージョンへの追随も少しは楽になるかもしれません。

最近のショッピングサイトでは、会員番号でもメールアドレスでも受け付ける、というものが増えてきているので、それなりに受入れやすいHackではないでしょうか。


また、include/common.php などは、他のHackとバッティングしやすいので、上書きされると困るケースもあるでしょう。その場合は、このアーカイブの各ファイルについて、'GIJ'という文字列で検索すれば、Hack箇所がどこか、すぐに判るはずです。


by GIJOE http://www.peak.ne.jp/xoops/

Downloaded 11736 times  11736  File Size 22.14 KB  Supported Platforms tar.gz  Home Page http://www.peak.ne.jp/
Modify | Report Broken File | Tell a Friend | Comments (5)


Comments list

toonstruck  Posted on 2005/3/10 13:02
Success!! Thank you!
GIJOE  Posted on 2005/3/8 19:02
Quote:
p.s. Even though it says I can use an email to log in- that does not work. I can only use a username to log in.
It must be a miss to overwriting include/checklogin.php .

Try to copy it again.
toonstruck  Posted on 2005/3/5 1:31 | Last modified
I'm glad that everyone is getting theirs to work. However, I'm still not able to get mine to work. :(

Can someone help?

I have installed the files, and I do get the "enter username or email" and also there is a "remember me" checkbox.

But it still wont remember your login after you shut down the browser.


Any suggestions on where to fix this?


p.s. Even though it says I can use an email to log in- that does not work. I can only use a username to log in.

p.p.s. I did update the systems module
Amy9621  Posted on 2005/3/2 2:04
ooh it works, thanks!
pmhoran  Posted on 2005/2/23 9:28
You're welcome ...

Its surprising what a middle age newbie can learn by making the same mistakes himself

Peter
cxjon  Posted on 2005/2/23 8:27
that worked.... thanks
cxjon  Posted on 2005/2/23 8:21
do i need to shut off the site to do that?
pmhoran  Posted on 2005/2/23 6:54
cxjon ...

When that happened to me it was because I had not "updated" the System module.

I am a sort of newbie ... but doing that worked for me

Peter
cxjon  Posted on 2005/2/23 6:43 | Last modified
I am having problems with this script I have loaded everything, and everything works except the "Remember me" check box is not showing up.

Here is what is going wrong, from the admin/blocks/login/edit template, I see the following:

<!-- <input type="checkbox" name="rememberme" value="On" class ="formButton" /><{$block.lang_rememberme}><br /> //-->

The file is not showing this nor is anything in the database or other files I check aside from a file in templates_c but even if I edit that, the system still lies

ソwhat am I doing wrong?

http://FiveZeroSeven.com
GIJOE  Posted on 2005/2/21 18:27
Quote:
I forgot to update System module after re-copying all the files over. I did it ... and now it works GREAT. Thanks for the assistance.
I'm happy to hear it.

This is just an issue of template.

ShortURLs does not harm autologin hack, I think.
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!