改变geonetwork的用户加密方式

geonetwork默认的用户密码加密方法是SHA1,但别的多数都是用的MD5,因此需要修改这个算法。

you just have to update the files :
/src/org/fao/geonet/services/login/Login.java
/src/org/fao/geonet/services/user/PwUpdate.java
/src/org/fao/geonet/services/user/Update.java
/src/org/fao/geonet/services/util/MainUtil.java

经过测试,只需要修改前面3个文件,修改完成后,直接运行ant生效。
注意其中的Util.scramble函数应该是处理SHA1加密算法的,可以去除,然后在SQL语句中直接添加为MD5函数就可以了。

参考:
1 http://www.nabble.com/set-pass-without-encryption-algorithms-or-CRYPT,-MD5-algorithm-td19666430.html

This entry was posted in GIS and tagged , , , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string T2my0d to the field below:

以新浪微博帐号登录