Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
jascly jiangjun
Renren Security
Commits
6cd1f4b8
Commit
6cd1f4b8
authored
8 years ago
by
sunlightcs
Browse files
Options
Download
Email Patches
Plain Diff
v2.1.0
parent
89026aa8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
doc/db.sql
+2
-2
doc/db.sql
renren-common/src/main/java/io/renren/xss/SQLFilter.java
+1
-1
renren-common/src/main/java/io/renren/xss/SQLFilter.java
renren-shiro/src/main/resources/renren-shiro.xml
+1
-0
renren-shiro/src/main/resources/renren-shiro.xml
renren-web/src/main/webapp/index.html
+1
-1
renren-web/src/main/webapp/index.html
renren-web/src/main/webapp/js/common.js
+0
-1
renren-web/src/main/webapp/js/common.js
renren-web/src/main/webapp/js/sys/config.js
+2
-0
renren-web/src/main/webapp/js/sys/config.js
renren-web/src/main/webapp/js/sys/menu.js
+2
-0
renren-web/src/main/webapp/js/sys/menu.js
renren-web/src/main/webapp/js/sys/oss.js
+2
-0
renren-web/src/main/webapp/js/sys/oss.js
renren-web/src/main/webapp/js/sys/role.js
+2
-0
renren-web/src/main/webapp/js/sys/role.js
renren-web/src/main/webapp/js/sys/schedule.js
+5
-0
renren-web/src/main/webapp/js/sys/schedule.js
renren-web/src/main/webapp/js/sys/user.js
+2
-0
renren-web/src/main/webapp/js/sys/user.js
with
20 additions
and
5 deletions
+20
-5
doc/db.sql
+
2
-
2
View file @
6cd1f4b8
...
...
@@ -85,8 +85,8 @@ CREATE TABLE `sys_oss` (
)
ENGINE
=
`InnoDB`
DEFAULT
CHARACTER
SET
utf8
COMMENT
=
'文件上传'
;
-- 初始数据
INSERT
INTO
`sys_user`
(
`user_id`
,
`username`
,
`password`
,
`email`
,
`mobile`
,
`status`
,
`create_time`
)
VALUES
(
'1'
,
'admin'
,
'8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918'
,
'root@renren.io'
,
'13612345678'
,
'1'
,
'2016-11-11 11:11:11'
);
-- 初始数据
INSERT
INTO
`sys_user`
(
`user_id`
,
`username`
,
`password`
,
`email`
,
`mobile`
,
`status`
,
`create_user_id`
,
`create_time`
)
VALUES
(
'1'
,
'admin'
,
'8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918'
,
'root@renren.io'
,
'13612345678'
,
'1'
,
'1'
,
'2016-11-11 11:11:11'
);
INSERT
INTO
`sys_menu`
(
`menu_id`
,
`parent_id`
,
`name`
,
`url`
,
`perms`
,
`type`
,
`icon`
,
`order_num`
)
VALUES
(
'1'
,
'0'
,
'系统管理'
,
NULL
,
NULL
,
'0'
,
'fa fa-cog'
,
'0'
);
INSERT
INTO
`sys_menu`
(
`menu_id`
,
`parent_id`
,
`name`
,
`url`
,
`perms`
,
`type`
,
`icon`
,
`order_num`
)
VALUES
(
'2'
,
'1'
,
'管理员列表'
,
'sys/user.html'
,
NULL
,
'1'
,
'fa fa-user'
,
'1'
);
INSERT
INTO
`sys_menu`
(
`menu_id`
,
`parent_id`
,
`name`
,
`url`
,
`perms`
,
`type`
,
`icon`
,
`order_num`
)
VALUES
(
'3'
,
'1'
,
'角色管理'
,
'sys/role.html'
,
NULL
,
'1'
,
'fa fa-user-secret'
,
'2'
);
...
...
This diff is collapsed.
Click to expand it.
renren-common/src/main/java/io/renren/xss/SQLFilter.java
+
1
-
1
View file @
6cd1f4b8
...
...
@@ -29,7 +29,7 @@ public class SQLFilter {
str
=
str
.
toLowerCase
();
//非法字符
String
[]
keywords
=
{
"master"
,
"truncate"
,
"insert"
,
"select"
,
"delete"
,
"update"
,
"declare"
,
"alert"
,
"create"
,
"drop"
};
String
[]
keywords
=
{
"master"
,
"truncate"
,
"insert"
,
"select"
,
"delete"
,
"update"
,
"declare"
,
"alert"
,
"drop"
};
//判断是否包含非法字符
for
(
String
keyword
:
keywords
){
...
...
This diff is collapsed.
Click to expand it.
renren-shiro/src/main/resources/renren-shiro.xml
+
1
-
0
View file @
6cd1f4b8
...
...
@@ -12,6 +12,7 @@
<!-- 设置session过期时间为1小时(单位:毫秒),默认为30分钟 -->
<property
name=
"globalSessionTimeout"
value=
"3600000"
></property>
<property
name=
"sessionValidationSchedulerEnabled"
value=
"true"
></property>
<property
name=
"sessionIdUrlRewritingEnabled"
value=
"false"
></property>
</bean>
<!-- Shiro默认会使用Servlet容器的Session,可通过sessionMode属性来指定使用Shiro原生Session -->
...
...
This diff is collapsed.
Click to expand it.
renren-web/src/main/webapp/index.html
+
1
-
1
View file @
6cd1f4b8
...
...
@@ -86,7 +86,7 @@
<footer
class=
"main-footer"
>
<div
class=
"pull-right hidden-xs"
>
Version 2.
0
.0
Version 2.
1
.0
</div>
Copyright
©
2017
<a
href=
"http://www.renren.io"
target=
"_blank"
>
renren.io
</a>
All Rights Reserved
</footer>
...
...
This diff is collapsed.
Click to expand it.
renren-web/src/main/webapp/js/common.js
+
0
-
1
View file @
6cd1f4b8
...
...
@@ -20,7 +20,6 @@ T.p = url;
//全局配置
$
.
ajaxSetup
({
dataType
:
"
json
"
,
contentType
:
"
application/json
"
,
cache
:
false
});
...
...
This diff is collapsed.
Click to expand it.
renren-web/src/main/webapp/js/sys/config.js
+
2
-
0
View file @
6cd1f4b8
...
...
@@ -76,6 +76,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/config/delete
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
ids
),
success
:
function
(
r
){
if
(
r
.
code
==
0
){
...
...
@@ -94,6 +95,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
url
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
vm
.
config
),
success
:
function
(
r
){
if
(
r
.
code
===
0
){
...
...
This diff is collapsed.
Click to expand it.
renren-web/src/main/webapp/js/sys/menu.js
+
2
-
0
View file @
6cd1f4b8
...
...
@@ -119,6 +119,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/menu/delete
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
menuIds
),
success
:
function
(
r
){
if
(
r
.
code
===
0
){
...
...
@@ -137,6 +138,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
url
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
vm
.
menu
),
success
:
function
(
r
){
if
(
r
.
code
===
0
){
...
...
This diff is collapsed.
Click to expand it.
renren-web/src/main/webapp/js/sys/oss.js
+
2
-
0
View file @
6cd1f4b8
...
...
@@ -88,6 +88,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
url
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
vm
.
config
),
success
:
function
(
r
){
if
(
r
.
code
===
0
){
...
...
@@ -110,6 +111,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/oss/delete
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
ossIds
),
success
:
function
(
r
){
if
(
r
.
code
===
0
){
...
...
This diff is collapsed.
Click to expand it.
renren-web/src/main/webapp/js/sys/role.js
+
2
-
0
View file @
6cd1f4b8
...
...
@@ -94,6 +94,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/role/delete
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
roleIds
),
success
:
function
(
r
){
if
(
r
.
code
==
0
){
...
...
@@ -132,6 +133,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
url
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
vm
.
role
),
success
:
function
(
r
){
if
(
r
.
code
===
0
){
...
...
This diff is collapsed.
Click to expand it.
renren-web/src/main/webapp/js/sys/schedule.js
+
5
-
0
View file @
6cd1f4b8
...
...
@@ -78,6 +78,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
url
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
vm
.
schedule
),
success
:
function
(
r
){
if
(
r
.
code
===
0
){
...
...
@@ -100,6 +101,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/schedule/delete
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
jobIds
),
success
:
function
(
r
){
if
(
r
.
code
==
0
){
...
...
@@ -123,6 +125,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/schedule/pause
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
jobIds
),
success
:
function
(
r
){
if
(
r
.
code
==
0
){
...
...
@@ -146,6 +149,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/schedule/resume
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
jobIds
),
success
:
function
(
r
){
if
(
r
.
code
==
0
){
...
...
@@ -169,6 +173,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/schedule/run
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
jobIds
),
success
:
function
(
r
){
if
(
r
.
code
==
0
){
...
...
This diff is collapsed.
Click to expand it.
renren-web/src/main/webapp/js/sys/user.js
+
2
-
0
View file @
6cd1f4b8
...
...
@@ -91,6 +91,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
"
../sys/user/delete
"
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
userIds
),
success
:
function
(
r
){
if
(
r
.
code
==
0
){
...
...
@@ -109,6 +110,7 @@ var vm = new Vue({
$
.
ajax
({
type
:
"
POST
"
,
url
:
url
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
vm
.
user
),
success
:
function
(
r
){
if
(
r
.
code
===
0
){
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help