PEAK XOOPS - auto-login hacked files for XOOPS 2.0.10/11/12/13.x in englishin japanese






Main : XOOPS Hacks : 

Category: XOOPS Hacks           php5
Download Now! Download Now! auto-login hacked files for XOOPS 2.0.10/11/12/13.x Popular Version: 2.0.13.2
Submitted Date:  2005/7/31
Description:
in englishin japanese

== AUTO-LOGIN V3 (REMEMBER ME) hacked files for XOOPS 2.0.10/11/12/13 ==

This package is only for 2.0.10/11/12/13 released from www.xoops.org. Don't apply it to 2.0.10JP or higher
Also don't apply it to 2.0.14 or higher


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

Hacked core files to be able to login automatically (+ alpha).
This package is for XOOPS 2.0.10/11/12/13


USAGE:
1) Overwrite these files into your XOOPS 2.0.10/11/12/13
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.

AUTO-LOGIN V3 is a little safer than V2.
V3 stores user's password as md5 encoded with time limitation.
If cookie is stolen by someone, he can't login after auto-login expiration.
This means that short expiration makes your site a little bit safer.

The feature of Retry or Repost is implemented with AUTO-LOGIN V2.

- You can access dynamic contents directly with autologin without CSRF vulnerablities.

- You can retry to post even if you are timed-out from the session.

These features are implemented in session_confirm.php.
Don't forget uploding this file.


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
define('_RETRYPOST','Time-out. Do you post again?');


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.



[xlang:ja]

●XOOPS 2.0.10/11/12/13用のオートログインハック(+α)済みコアファイルパック (V3)

これは本家版用です。2.0.*JP 用ではないので、注意してください!

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

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

V3 では、クッキーへの保存形式を若干変えることで、安全性が多少マシになりました。
期限付きでmd5エンコードされたパスワードしかクッキーに保存しませんので、誰かがクッキーを盗んだとしても、その期限以降であればログインに成功しません。
つまり、オートログイン有効期限が重要なわけで、デフォルトの1週間を1ヶ月や1年に延長すると、それだけ危険性が増すことに留意ください。

オートログイン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/
[xlang:ja]

Downloaded 21283 times  21283  File Size 16.14 KB  Supported Platforms tar.gz|zip|php5  Home Page http://www.peak.ne.jp/xoops/
Modify | Report Broken File | Tell a Friend | Comments (4)


Comments list

hademe  Posted on 2006/9/17 8:31
i found problem.. i chanced common.php because i added to my site and i had to change common.php. so now can you say me ?

in a normal comman.php where have to i your cahenged kod for outo login add?

so ı can ad manuel and i solve problem..

thankss
hademe  Posted on 2006/9/17 7:52 | Last modified
i use 2.13.2 core or not core i dont know. ı downloded from xoops.org

if not core is it not possible? or is there a hack for 2.13.2??

i just want my user haven't login everytime..i want they loin once and if they dont click logout my site known them in the next time. (maybe not neserry for me i mean for admin but for user it is neserary) thenks
GIJOE  Posted on 2006/9/16 5:54
Check them
- version of core and version of hack
- overwrite all files successfully(especially include/common.php)

You should know there are two confusing versions of xoops core.

- 2.0.x from xoops.org
- 2.0.x-JP from xoopscube.org
bliss  Posted on 2006/9/15 8:04
I have problem too.
Please help.
hademe  Posted on 2006/9/15 5:16
i lo in my site checked remember me. i close site. after 15 minites i go in my site. my nicname seems in who is online blocks. but i am not log in.. wyh can be?? thanks advandced help..
cxjon  Posted on 2005/7/14 5:39
will this work for 2.0.11?
GIJOE  Posted on 2005/6/15 19:05
hi domifara.

Thank you for reporting!
I've just modified the archive.
domifara  Posted on 2005/6/15 18:34
typo is
language/japanese/global.php
line 117

in
Submitted Date: 2005/4/24

autologin_for_xoops2.0.10.tar.gz
or
autologin_for_xoops2.0.10.zip

1define('_FAILSAVEIMG', '画像ファイル %s をデータベースに格納できませんでした。');

to

define('_FAILSAVEIMG', '画像ファイル %s をデータベースに格納できませんでした。');


The blank page is displayed.

[xlang:ja]
1 ってついてるだけですが、見た目症状として致命的で、構文error で止まり真っ白になります。
[/xlang:ja]
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!