学习jive的取回密码流程

  在这个问题走偏了。下了一个jivejdon2.5,却搞不定里面的中文化问题,本来里面没有取回密码的功能,可我还是尝试解决这个中文化问题。里面用的是is088591编码,在管理页面设置本地化和创建中文论坛,发中文帖子不行。问题暂时记在这里。先把既定的目标完成。我的环境是:Window2000+tomcat5+mysql4

  在jive3中有取回密码的功能,初步用导入导出sql文件在ultraedit比较的方法找到它存取回密码userID和Token的字段存在在表jiveuserprop中:

CREATE TABLE `jiveuserprop` (

  `userID` bigint(20) NOT NULL default '0',

  `name` varchar(100) NOT NULL default '',

  `propValue` text NOT NULL,

  PRIMARY KEY  (`userID`,`name`)

) TYPE=MyISAM;

数据:INSERT INTO `jiveuserprop` VALUES (1,'jiveAdminUserRange','15') , (1,'jiveThreadRange','15') , (1,'jiveMessageRange','15') , (1,'jiveTimeZoneID','Asia/Shanghai') , (1,'jiveAutoWatchNewTopics','false') , (1,'jiveAutoWatchReplies','false') , (1,'jiveAutoAddEmailWatch','false') , (2,'jiveSignatureVisible','true') , (2,'jive.passwordreset.token','1fgNz9LH') , (2,'jive.passwordreset.timestamp','1131889036888') , (2,'jive.passwordreset.last_sent','1131889036888') , (5,'jiveLocation','sds') , (5,'jiveOccupation','dsds') ;

可以看到,它里面的token是没有加密的。

当用户用jive3发的重设密码的链接:http://localhost:8080/jive3/resetPassword!default.jspa?userid=5&token=2qSwKIgy 重设密码后,有关的字段值就被删除了,如下:

INSERT INTO `jiveuserprop` VALUES (1,'jiveAdminUserRange','15') , (1,'jiveThreadRange','15') , (1,'jiveMessageRange','15') , (1,'jiveTimeZoneID','Asia/Shanghai') , (1,'jiveAutoWatchNewTopics','false') , (1,'jiveAutoWatchReplies','false') , (1,'jiveAutoAddEmailWatch','false') , (2,'jiveSignatureVisible','true') , (5,'jiveLocation','sds') , (5,'jiveOccupation','dsds') ;

jive3是隔了72小时取回密码失效,下面验证一下,发送密码后的值:

INSERT INTO `jiveuserprop` VALUES (1,'jiveAdminUserRange','15') , (1,'jiveThreadRange','15') , (1,'jiveMessageRange','15') , (1,'jiveTimeZoneID','Asia/Shanghai') , (1,'jiveAutoWatchNewTopics','false') , (1,'jiveAutoWatchReplies','false') , (1,'jiveAutoAddEmailWatch','false') , (2,'jiveSignatureVisible','true') , (2,'jive.passwordreset.last_sent','1133261729536') , (2,'jive.passwordreset.timestamp','1133261729536') , (2,'jive.passwordreset.token','ywE1T2Q0') , (5,'jiveLocation','sds') , (5,'jiveOccupation','dsds') ;

把系统时间调后72小时以后,重设密码失败:

Forums - Reset Your Password

  Welcome, Guest 

 Login 

 Guest Settings 

 Help 

 

Please enter the userID and the token exactly as shown in the password reset email you have previously received. Please note that the token is case sensitive.

An error occurred validating the userID and token that was just entered. Please confirm the userID and the token was entered exactly as shown in the email and note that the token is case sensitive. If both are exactly as shown in your email and 72 hours have passed since the email was sent, you will have to start over.

Reset your password 

UserID:   

Token:

Invalid token   

New Password:   

Confirm Password:   

  

查看数据库中相应的字段:

INSERT INTO `jiveuserprop` VALUES (1,'jiveAdminUserRange','15') , (1,'jiveThreadRange','15') , (1,'jiveMessageRange','15') , (1,'jiveTimeZoneID','Asia/Shanghai') , (1,'jiveAutoWatchNewTopics','false') , (1,'jiveAutoWatchReplies','false') , (1,'jiveAutoAddEmailWatch','false') , (2,'jiveSignatureVisible','true') , (5,'jiveLocation','sds') , (5,'jiveOccupation','dsds') ;

可以看出,字段值已经被删除了。

至此,jive3的取回密码实现的大概思路已经掌握了。

One thought on “学习jive的取回密码流程”

Comments are closed.