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






Main : XOOPS Hacks : 

Category: XOOPS Hacks          
Download Now! auto-login hacked files for XOOPS 2.0.6 Popular Version: 2.0.6
Submitted Date:  2004/4/28
Description:
Hacked core files to be able to login automatically.
This package is only for XOOPS 2.0.6.


USAGE:
1) Overwrite these files into your XOOPS 2.0.6
2) update system module. If you are using a custom template set you will need to edit the system_block_login.html for that set.

This hack is not compatible to custom user sessions.
You have to turn "Use custom session" off in admin/preferences/general.
But you have to set the cookie time in admin/preferences/general settings to the number of minutes the cookie will be stored, i.e. "10080" minutes for one week.

This hack stores the password as an MD5 hash on the client, but this is vulnerable to dictionary attacks, and simple copying to another computer.

This hack is a potential security hole, don't enable it lightly.


APPENDIX:
Onokazu took the auto-login hack which GIJOE had released, into XOOPS core with comment-outed.

My hacked files are removed '//' and fixed two problems in older hack:

A) The cookie's path is root (='/'). This cause a collision of the cookies from two Xoops sites running on the same hostname.

B) This hack weakens XOOPS from CSRF attack. (Some modules are defenseless from CSRF. They delete or update its records by GET methods easily.)

To prevents from CSRF, my autologin codes force redirection to XOOPS_URL when query is not null.

If you dislike such a redirection, do comment out like this:

line 164 in include/common.php

// redirect to Root when query string exists (anti-CSRF)
//if( ! empty( $HTTP_SERVER_VARS['QUERY_STRING'] ) ) {
// redirect_header( XOOPS_URL , 0 , 'Now, logging in automatically' ) ;
// exit ;
//}


CHANGES:

2004-4-28 updated anti-CSRF codes



-----------------------------------------------------------
(For Japanese)

●XOOPS 2.0.6 用のオートログインハック済みコアファイルパック


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

このHackは、unameとmd5ハッシュ済のパスワードをクッキーに保存するのですが、その有効時間は、一般設定の「セッションがタイムアウトするまでの時間(単位:分)」で指定します。一般的には1週間(10080)~1ヶ月(43200)程度が妥当だと思います。

ただし、本当のところは、この値を流用しているだけなので、「セッションの設定をカスタマイズする」としてしまうと、オートログインは有効にならず、セッションがずっと生きているだけ、という処理になります。オートログインを利用する際には、カスタムセッションはOFFにして下さい。

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


実は、2.0.4以降、onokazuさんが私の自動ログインHackを取り込んでくれているのですが、初期状態では//でコメントアウトしてあります。

2.0.6RC までのPatchでは、最終ログイン日時を強制的に更新するコードも追加していましたが、2.0.6にてその機能が有効にならない原因だったtypoが修正されたため、そのコードも削除しました。

また、2.0.6RCまでのPatchでは、クッキーを'/'に対して発行するため、同じホスト名で2つ以上のXOOPSが動いている場合、クッキーの衝突ということがありました。

今回のパッチでは、その衝突を避けるコードも追加しています。

さらに、CSRFによる攻撃を避けるために、オートログインが機能した時には、強制的にXOOPS_URLへリダイレクトするコードも追加しました。

この動作がどうしても嫌な場合は、include/common.php の 164行目からの数行を以下のようにコメントアウトして下さい。

// redirect to Root when query string exists (anti-CSRF)
//if( ! empty( $HTTP_SERVER_VARS['QUERY_STRING'] ) ) {
// redirect_header( XOOPS_URL , 0 , 'Now, logging in automatically' ) ;
// exit ;
//}


変更履歴:

2004-4-28 CSRF対策が不十分だったのを改良 (include/common.php)


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


Comments list

Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!