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






Main : XOOPS Hacks : 

Category: XOOPS Hacks          
Download Now! auto-login hacked files for XOOPS 2.0.7.3 Popular Version: 2.0.7.3
Submitted Date:  2004/11/30
Description:
Notice:

If you are using my auto-login hack for 2.0.7.1/2, All you have to do is overwrite include/common.php of this archive.
The vulnerablity found in 2.0.7.1/2 will be fixed by overwriting include/common.php of this archive.

2004-11-30 modified compatibilities against XT Temas
------------------------------------------------------------------

Hacked core files to be able to login automatically (+ alpha).
This package is for XOOPS 2.0.7 & 2.0.7.1 & 2.0.7.2 & 2.0.7.3

USAGE:
1) Overwrite these files into your XOOPS 2.0.7 or 2.0.7.1 or 2.0.7.2 or 2.0.7.3
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.

If you want to set the life time of remembering, insert a line into mainfile.php like this:

define('XOOPS_AUTOLOGIN_LIFETIME',2678400);

This example specifies the life time as 1 month.
The default value is 604800 (= 1week).

The prior version of auto-login hacks useed the value of session_expire.
But this hack harms customizing session.
Thus I've changed the code like above.


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.


HACKED POINTS:

You can easily find hacked points by searching the words 'GIJ'.
If you use customized language files or some language files other than english or japanese, you should manually add a line into language/(your language)/global.php

define('_REMEMBERME','remember me'); // describe with your language


And if you can, edit this line.

define('_USERNAME','username or email: '); // describe with your language



ABOUT + ALPHA:

This hack also modifies your XOOPS can be logged in by email.
Users can login not only uname+password but also email+password.
Of course, even the users logged in by email+password can login automatically on/after next access.


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

But I think these codes should be deprecated.
These are the reasons why:

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.

C) The old hack harms customized session.



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

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

--------------------------------------------------
お知らせ:

2.0.7.1または2.0.7.2用のオートログインハックをかけていた人は、新しいアーカイブ内の include/common.php を上書きして下さい。それだけで、2.0.7.3 相当のセキュリティパッチも当たったことになります。
2.0.7以前のバージョンをお使いの方は、まずはコアバージョンを2.0.7.3まで上げてください。

2004-11-30 XT Temasが正常に動作しなかったのを修正
--------------------------------------------------

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

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

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

define('XOOPS_AUTOLOGIN_LIFETIME',2678400);

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


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


実は、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箇所がどこか、すぐに判るはずです。

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


Comments list

GIJOE  Posted on 2005/3/8 18:56
I can't support you about my work personally.

If you can't understand how to use this hack, I recommend you to restore same as original.

copy these files from the original core package into your system.

user.php
modules/system/blocks/system_blocks.php
modules/system/templates/system_userform.html
modules/system/templates/blocks/system_block_login.html
include/common.php
include/checklogin.php
language/english/global.php
luisinho  Posted on 2005/3/5 13:48
sorry, but it doesn't work on mi site..!

http://www.globalservices.ch/foot/
noisia  Posted on 2004/10/9 9:58 | Last modified
Hi GiJoe,

Great modules you are developing. Thanks a zillion...


Looking forward to more great developments.
GIJOE  Posted on 2004/8/21 20:02
hi mikeh.

I don't know because I've never seen ipb module.

If the module overwrites only include/common.php, it might be an easy hack.
mikeh  Posted on 2004/8/21 19:51
how hard would this be tohack to use with ipb module
thanks
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!