Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
browser-backend
Commits
06880979
Commit
06880979
authored
Jul 10, 2020
by
xuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存用户明文密码
parent
f35f9330
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
UserServiceImpl.java
...gec/browserbackend/auth/service/Impl/UserServiceImpl.java
+4
-3
IpResourceRepositoryCustomImpl.java
...nd/browser/repository/IpResourceRepositoryCustomImpl.java
+4
-2
Set3proxyTask.java
.../com/edgec/browserbackend/browser/task/Set3proxyTask.java
+1
-1
No files found.
src/main/java/com/edgec/browserbackend/auth/service/Impl/UserServiceImpl.java
View file @
06880979
...
...
@@ -107,13 +107,14 @@ public class UserServiceImpl implements UserService {
}
);
String
hash
=
encoder
.
encode
(
user
.
getPassword
());
user
.
setPassword
(
hash
);
String
password
=
user
.
getPassword
();
String
hash
=
encoder
.
encode
(
password
);
user
.
setPassword
(
hash
);
repository
.
save
(
user
);
// 保存明文密码
userCodeRepository
.
save
(
new
UserCode
(
user
.
getUsername
(),
user
.
getPassword
()
));
userCodeRepository
.
save
(
new
UserCode
(
user
.
getUsername
(),
password
));
log
.
info
(
"new user has been created: {}"
,
user
.
getUsername
());
}
...
...
src/main/java/com/edgec/browserbackend/browser/repository/IpResourceRepositoryCustomImpl.java
View file @
06880979
...
...
@@ -81,8 +81,10 @@ public class IpResourceRepositoryCustomImpl implements IpResourceRepositoryCusto
@Override
public
List
<
IpResource
>
sampleTasks
(
List
<
Integer
>
status
)
{
Criteria
matchCriteria
=
new
Criteria
();
matchCriteria
.
orOperator
(
where
(
"status"
).
in
(
status
).
and
(
"isLocked"
).
is
(
false
).
and
(
"validTime"
).
gt
(
Instant
.
now
().
toEpochMilli
()).
and
(
"isDeleted"
).
is
(
false
).
and
(
"healthLockTimestamp"
).
lte
(
Instant
.
now
().
minusSeconds
(
60
*
30
).
toEpochMilli
()),
where
(
"status"
).
in
(
status
).
and
(
"isLocked"
).
is
(
true
).
and
(
"healthLockTimestamp"
).
lte
(
Instant
.
now
().
minusSeconds
(
600
).
toEpochMilli
()).
and
(
"isDeleted"
).
is
(
false
));
matchCriteria
.
orOperator
(
where
(
"status"
).
in
(
status
).
and
(
"isLocked"
).
is
(
false
).
and
(
"validTime"
).
gt
(
Instant
.
now
().
toEpochMilli
()).
and
(
"isDeleted"
).
is
(
false
).
and
(
"healthLockTimestamp"
).
lte
(
Instant
.
now
().
minusSeconds
(
60
*
30
).
toEpochMilli
()),
where
(
"status"
).
in
(
status
).
and
(
"isLocked"
).
is
(
true
).
and
(
"healthLockTimestamp"
).
lte
(
Instant
.
now
().
minusSeconds
(
600
).
toEpochMilli
()).
and
(
"isDeleted"
).
is
(
false
)
);
MatchOperation
match
=
Aggregation
.
match
(
matchCriteria
);
...
...
src/main/java/com/edgec/browserbackend/browser/task/Set3proxyTask.java
View file @
06880979
...
...
@@ -92,7 +92,7 @@ public class Set3proxyTask {
bw
.
write
(
"\nallow none\nproxy -p20004\nsocks -p20005\n"
);
bw
.
flush
();
bw
.
close
();
log
.
error
(
"成功写入文件"
);
log
.
info
(
"成功写入文件"
);
if
(
proxyConfigRepository
.
count
()
>
0
)
{
ProxyConfig
proxyConfig
=
proxyConfigRepository
.
findAll
().
get
(
0
);
...
...
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