Skip to content

Commit 37079bc

Browse files
committedMar 1, 2020
解决七牛云SDK依赖版本冲突问题,修复成绩管理模块代码漏洞
1 parent 73a9268 commit 37079bc

File tree

11 files changed

+1740
-354
lines changed

11 files changed

+1740
-354
lines changed
 

‎.classpath

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
<attribute name="maven.pomderived" value="true"/>
2424
</attributes>
2525
</classpathentry>
26-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
27-
<attributes>
28-
<attribute name="maven.pomderived" value="true"/>
29-
</attributes>
30-
</classpathentry>
3126
<classpathentry kind="src" path=".apt_generated">
3227
<attributes>
3328
<attribute name="optional" value="true"/>
@@ -39,5 +34,10 @@
3934
<attribute name="test" value="true"/>
4035
</attributes>
4136
</classpathentry>
37+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
38+
<attributes>
39+
<attribute name="maven.pomderived" value="true"/>
40+
</attributes>
41+
</classpathentry>
4242
<classpathentry kind="output" path="target/classes"/>
4343
</classpath>

‎.factorypath

-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@
107107
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlbeans/xmlbeans/2.6.0/xmlbeans-2.6.0.jar" enabled="true" runInBatchMode="false"/>
108108
<factorypathentry kind="VARJAR" id="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar" enabled="true" runInBatchMode="false"/>
109109
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/virtuald/curvesapi/1.04/curvesapi-1.04.jar" enabled="true" runInBatchMode="false"/>
110-
<factorypathentry kind="VARJAR" id="M2_REPO/com/qiniu/qiniu-java-sdk/7.2.22/qiniu-java-sdk-7.2.22.jar" enabled="true" runInBatchMode="false"/>
111-
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/okhttp/3.11.0/okhttp-3.11.0.jar" enabled="true" runInBatchMode="false"/>
112-
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okio/okio/1.14.0/okio-1.14.0.jar" enabled="true" runInBatchMode="false"/>
113110
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.4/gson-2.8.4.jar" enabled="true" runInBatchMode="false"/>
114111
<factorypathentry kind="VARJAR" id="M2_REPO/com/qcloud/cos_api/5.2.4/cos_api-5.2.4.jar" enabled="true" runInBatchMode="false"/>
115112
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.5/httpclient-4.5.5.jar" enabled="true" runInBatchMode="false"/>

‎.settings/org.eclipse.wst.common.component

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
77
<wb-resource deploy-path="/WEB-INF/classes" source-path="/.apt_generated"/>
88
<wb-resource deploy-path="/WEB-INF/classes" source-path="/.apt_generated_tests"/>
9+
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
910
<property name="context-root" value="OnlineExam"/>
1011
<property name="java-output-path" value="/OnlineExam/target/classes"/>
1112
</wb-module>

‎log/online-exam.log

+1,696-67
Large diffs are not rendered by default.

‎log/online-exam.log.2020-02-12.0.gz

17.6 KB
Binary file not shown.

‎pom.xml

+36-43
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
<groupId>org.springframework.boot</groupId>
1515
<artifactId>spring-boot-starter-parent</artifactId>
1616
<version>2.0.2.RELEASE</version>
17-
<relativePath/>
17+
<relativePath />
1818
</parent>
19-
20-
<!-- 字符编码UTF-8、指定jdk的版本为1.8,默认为1.5 -->
19+
20+
<!-- 字符编码UTF-8、指定jdk的版本为1.8,默认为1.5 -->
2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
2525
</properties>
26-
26+
2727
<!--指定项目中公有的依赖 -->
2828
<dependencies>
2929
<!-- spring boot的相关启动 -->
@@ -35,34 +35,27 @@
3535
<groupId>org.springframework.boot</groupId>
3636
<artifactId>spring-boot-starter-aop</artifactId>
3737
</dependency>
38-
38+
3939
<!-- spring boot单元测试 -->
40-
<!-- <dependency>
41-
<groupId>org.springframework.boot</groupId>
42-
<artifactId>spring-boot-starter-test</artifactId>
43-
<scope>test</scope>
44-
</dependency> -->
45-
40+
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId>
41+
<scope>test</scope> </dependency> -->
42+
4643
<!-- 开启热部署 -->
47-
<!-- <dependency>
48-
<groupId>org.springframework.boot</groupId>
49-
<artifactId>spring-boot-devtools</artifactId>
50-
<optional>true</optional>
51-
<scope>true</scope>
52-
</dependency> -->
53-
44+
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId>
45+
<optional>true</optional> <scope>true</scope> </dependency> -->
46+
5447
<!-- springboot redis -->
5548
<dependency>
5649
<groupId>org.springframework.boot</groupId>
5750
<artifactId>spring-boot-starter-data-redis</artifactId>
5851
</dependency>
59-
52+
6053
<!-- springboot thymeleaf -->
6154
<dependency>
6255
<groupId>org.springframework.boot</groupId>
6356
<artifactId>spring-boot-starter-thymeleaf</artifactId>
6457
</dependency>
65-
58+
6659
<!-- springboot整合mybatis -->
6760
<dependency>
6861
<groupId>org.mybatis.spring.boot</groupId>
@@ -73,14 +66,14 @@
7366
<groupId>org.springframework.boot</groupId>
7467
<artifactId>spring-boot-configuration-processor</artifactId>
7568
</dependency>
76-
69+
7770
<!--mapper -->
7871
<dependency>
7972
<groupId>tk.mybatis</groupId>
8073
<artifactId>mapper-spring-boot-starter</artifactId>
8174
<version>1.2.3</version>
8275
</dependency>
83-
76+
8477
<!-- pagehelper分页插件 -->
8578
<dependency>
8679
<groupId>com.github.pagehelper</groupId>
@@ -93,41 +86,41 @@
9386
</exclusion>
9487
</exclusions>
9588
</dependency>
96-
89+
9790
<!-- apache shiro -->
9891
<dependency>
9992
<groupId>org.apache.shiro</groupId>
10093
<artifactId>shiro-spring</artifactId>
10194
<version>1.4.0</version>
10295
</dependency>
103-
96+
10497
<!-- 阿里巴巴 Druid数据源依赖 -->
10598
<dependency>
10699
<groupId>com.alibaba</groupId>
107100
<artifactId>druid</artifactId>
108101
<version>1.1.10</version>
109102
</dependency>
110-
103+
111104
<dependency>
112-
<groupId>com.alibaba</groupId>
113-
<artifactId>easyexcel</artifactId>
114-
<version>1.1.2-beat1</version>
105+
<groupId>com.alibaba</groupId>
106+
<artifactId>easyexcel</artifactId>
107+
<version>1.1.2-beat1</version>
115108
</dependency>
116-
109+
117110
<!-- 数据库连接池、驱动 -->
118111
<dependency>
119112
<groupId>mysql</groupId>
120113
<artifactId>mysql-connector-java</artifactId>
121114
<version>5.1.47</version>
122115
</dependency>
123-
116+
124117
<!-- springboot thymeleaf和shiro 整合——按钮可见性 -->
125118
<dependency>
126119
<groupId>com.github.theborakompanioni</groupId>
127120
<artifactId>thymeleaf-extras-shiro</artifactId>
128121
<version>2.0.0</version>
129122
</dependency>
130-
123+
131124
<!-- shiro连接redis集群 -->
132125
<dependency>
133126
<groupId>org.crazycake</groupId>
@@ -140,20 +133,20 @@
140133
</exclusion>
141134
</exclusions>
142135
</dependency>
143-
136+
144137
<!-- kaptcha验证码 -->
145138
<dependency>
146139
<groupId>com.github.penggle</groupId>
147140
<artifactId>kaptcha</artifactId>
148141
<version>2.3.2</version>
149142
</dependency>
150-
143+
151144
<dependency>
152145
<groupId>commons-lang</groupId>
153146
<artifactId>commons-lang</artifactId>
154147
<version>2.6</version>
155148
</dependency>
156-
149+
157150
<!-- 阿里巴巴fastjson json数据格式 -->
158151
<dependency>
159152
<groupId>com.alibaba</groupId>
@@ -170,28 +163,28 @@
170163
<artifactId>poi-ooxml</artifactId>
171164
<version>3.17</version>
172165
</dependency>
173-
166+
174167
<!-- 七牛云 -->
175168
<dependency>
176169
<groupId>com.qiniu</groupId>
177170
<artifactId>qiniu-java-sdk</artifactId>
178-
<version>[7.2.0, 7.2.99]</version>
171+
<version>7.2.28</version>
179172
</dependency>
180-
181-
<!--腾讯云存储依赖-->
173+
174+
<!--腾讯云存储依赖 -->
182175
<dependency>
183-
<groupId>com.qcloud</groupId>
184-
<artifactId>cos_api</artifactId>
185-
<version>5.2.4</version>
176+
<groupId>com.qcloud</groupId>
177+
<artifactId>cos_api</artifactId>
178+
<version>5.2.4</version>
186179
</dependency>
187-
180+
188181
<!-- jsoup Java的HTML解析器 -->
189182
<dependency>
190183
<groupId>org.jsoup</groupId>
191184
<artifactId>jsoup</artifactId>
192185
<version>1.9.2</version>
193186
</dependency>
194-
187+
195188
</dependencies>
196189
<build>
197190
<plugins>

‎src/main/java/com/exam/service/impl/GradeServiceImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public List<Integer> getUserNumsAnalysis(StatisticConditionVo vo) {
8080
userList.add(standardUserNums);
8181
userList.add(goodUserNums);
8282
userList.add(fineUserNums);
83-
if(totalUserNums != 0) {
83+
if(totalUserNums != 0 && totalUserNums-noMarkUserNums != 0) {
8484
BigDecimal b = new BigDecimal((float)passUserNums/(totalUserNums-noMarkUserNums));
8585
Integer passRate = (int) (b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()*100);
8686
userList.add(passRate);

‎src/main/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server:
2-
port: 8081
2+
port: 80
33
tomcat:
44
uri-encoding: utf-8
55
logging:

‎target/classes/mapper/UserMapper.xml

-204
This file was deleted.

‎target/classes/static/img/logo.png

-44 KB
Binary file not shown.

‎target/classes/templates/error/404.html

-30
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.