Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo
Commits
776a0a03
Commit
776a0a03
authored
May 27, 2013
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo 屏蔽修改密码
parent
df7b3299
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
core/src/main/java/org/b3log/solo/service/UserMgmtService.java
...src/main/java/org/b3log/solo/service/UserMgmtService.java
+6
-4
war/bae/src/main/resources/latke.properties
war/bae/src/main/resources/latke.properties
+3
-3
No files found.
core/src/main/java/org/b3log/solo/service/UserMgmtService.java
View file @
776a0a03
...
...
@@ -39,7 +39,7 @@ import org.json.JSONObject;
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @author <a href="mailto:385321165@qq.com">DASHU</a>
* @version 1.0.0.
5, May 16
, 2013
* @version 1.0.0.
6, May 27
, 2013
* @since 0.4.0
*/
public
final
class
UserMgmtService
{
...
...
@@ -58,7 +58,7 @@ public final class UserMgmtService {
* Language service.
*/
private
LangPropsService
langPropsService
=
LangPropsService
.
getInstance
();
/**
* Length of hashed password.
*/
...
...
@@ -111,8 +111,10 @@ public final class UserMgmtService {
final
String
newHashedPassword
=
MD5
.
hash
(
userPassword
);
final
String
oldHashedPassword
=
oldUser
.
optString
(
User
.
USER_PASSWORD
);
if
(!
mybeHashed
||
(!
oldHashedPassword
.
equals
(
userPassword
)
&&
!
oldHashedPassword
.
equals
(
newHashedPassword
)))
{
oldUser
.
put
(
User
.
USER_PASSWORD
,
newHashedPassword
);
if
(!
"demo.b3log.org"
.
equals
(
Latkes
.
getServerHost
()))
{
// Skips the B3log Solo Online Demo (http://demo.b3log.org)
if
(!
mybeHashed
||
(!
oldHashedPassword
.
equals
(
userPassword
)
&&
!
oldHashedPassword
.
equals
(
newHashedPassword
)))
{
oldUser
.
put
(
User
.
USER_PASSWORD
,
newHashedPassword
);
}
}
final
String
userRole
=
requestJSONObject
.
optString
(
User
.
USER_ROLE
);
...
...
war/bae/src/main/resources/latke.properties
View file @
776a0a03
...
...
@@ -16,7 +16,7 @@
#
# Description: B3log Latke configurations. Configures the section "Server" carefully.
# Version: 1.0.0.
8, Apr 1
, 2013
# Version: 1.0.0.
9, May 27
, 2013
# Author: Liang Ding
#
...
...
@@ -49,8 +49,8 @@ cache=BAE
userService
=
LOCAL
#### Cache ####
cache.maxPageCnt
=
128
cache.maxDataCnt
=
128
cache.maxPageCnt
=
0
cache.maxDataCnt
=
0
#### Static resource version ####
staticResourceVersion
=
201211021410
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment