-=======
-
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
@@ -769,10 +742,7 @@
name="访问网站密码"
label="访问网站密码"
placeholder="建议开启访问网站密码"
-<<<<<<< HEAD
:rules="[{ validator: customValidator }]"
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
/>
>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
//加载状态
const loading = ref(true);
@@ -966,10 +932,6 @@ const loginPassword = ref("");
const license_id = ref("");
const getTokenPassword = ref("");
const containerName = ref("PandoraNext");
-<<<<<<< HEAD
-=======
-const cookiesSetupPassword = ref("");
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
const autoToken_url = ref("default");
const whitelist = ref("");
@@ -1083,18 +1045,12 @@ const onSearch = (value: string) => {
*/
const fetchDataAndFillForm = async (value: string) => {
try {
-<<<<<<< HEAD
const response = await axios.get(
`/api/selectToken?name=${value}`,
{
headers,
}
);
-=======
- const response = await axios.get(`/api/seleteToken?name=${value}`, {
- headers,
- });
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
const data_token = response.data.data;
console.log(data_token);
@@ -1118,18 +1074,12 @@ const fetchDataAndFillForm = async (value: string) => {
// 将用户数据添加到tableData
tableData.value = resUsers;
-<<<<<<< HEAD
const response = await axios.get(
`/api/selectSetting`,
{
headers,
}
);
-=======
- const response = await axios.get(`/api/selectSetting`, {
- headers,
- });
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
const data = response.data.data;
console.log(data);
proxy_api_prefix.value = data.proxy_api_prefix;
@@ -1154,10 +1104,6 @@ const fetchDataAndFillForm = async (value: string) => {
license_id.value = data.license_id;
getTokenPassword.value = data.getTokenPassword;
containerName.value = data.containerName;
-<<<<<<< HEAD
-=======
- cookiesSetupPassword.value = data.cookiesSetupPassword;
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
autoToken_url.value = data.autoToken_url;
provider.value = data.validation.provider;
site_key.value = data.validation.site_key;
@@ -1197,12 +1143,9 @@ const fetchDataAndFillForm = async (value: string) => {
// 在组件加载完成后自动触发数据加载和填充
onMounted(() => {
-<<<<<<< HEAD
if (window.innerWidth <= 700) {
router.replace("/iphone");
}
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
fetchLoginToken();
onSearch(value.value);
});
@@ -1242,11 +1185,7 @@ const handleEdit = (index: number, row: User) => {
* 添加token开启函数
* 类user
*/
-<<<<<<< HEAD
const addToken = () => {
-=======
- const addToken = () => {
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
show_1.value = true;
};
@@ -1390,10 +1329,6 @@ const RequireSetting = (value: any) => {
license_id: license_id.value,
getTokenPassword: getTokenPassword.value,
containerName: containerName.value,
-<<<<<<< HEAD
-=======
- cookiesSetupPassword: cookiesSetupPassword.value,
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
autoToken_url: autoToken_url.value,
whitelist: whitelist.value,
validation: validation,
@@ -1417,10 +1352,7 @@ const RequireSetting = (value: any) => {
} else {
ElMessage(data.msg);
}
-<<<<<<< HEAD
fetchLoginToken();
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
loadingInstance.close();
})
.catch((error) => {
@@ -1653,7 +1585,6 @@ const updatePoolToken = async () => {
* 更换pool_token
*/
-<<<<<<< HEAD
const changePoolToken = async () => {
ElMessageBox.confirm("是否需要更换Pool_token的值,并重新刷新?", "Warning", {
confirmButtonText: "yes",
@@ -1669,24 +1600,6 @@ const changePoolToken = async () => {
headers,
}
);
-=======
- const changePoolToken = async () => {
- ElMessageBox.confirm(
- '是否需要更换Pool_token的值,并重新刷新?',
- 'Warning',
- {
- confirmButtonText: 'yes',
- cancelButtonText: 'no',
- type: 'warning',
- }
- )
- .then(async () => {
- const loadingInstance = ElLoading.service({ fullscreen: true });
- try {
- const response = await axios.get(`/api/ChangePoolToken`, {
- headers,
- });
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
const data = response.data.data;
temPoolToken.value = data;
@@ -1721,17 +1634,10 @@ const changePoolToken = async () => {
})
.catch(() => {
ElMessage({
-<<<<<<< HEAD
type: "info",
message: "取消更改Pool_Token",
});
});
-=======
- type: 'info',
- message: '取消更改Pool_Token',
- })
- })
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
};
/**
* 一键全生成
diff --git a/PandoraNext-TokensTool/src/views/loginIndex.vue b/PandoraNext-TokensTool/src/views/loginIndex.vue
index 952b033..b5bb986 100644
--- a/PandoraNext-TokensTool/src/views/loginIndex.vue
+++ b/PandoraNext-TokensTool/src/views/loginIndex.vue
@@ -74,11 +74,7 @@
欢迎大家来扩展
PandoraNext-TokensTool v0.4.7.1
-=======
- >PandoraNext-TokensTool v0.4.7
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/apiController.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/apiController.java
index c74c1c1..7bd5752 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/apiController.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/apiController.java
@@ -62,17 +62,11 @@ public void setSystemService(apiService apiService) {
* @param name
* @return 通过name获取到(tokens.json)文件里的全部值
*/
-<<<<<<< HEAD
+
@GetMapping("selectToken")
public Result selectToken(@RequestParam("name") String name){
try {
List
res = apiService.selectToken(name);
-=======
- @GetMapping("seleteToken")
- public Result seleteToken(@RequestParam("name") String name){
- try {
- List res = apiService.seleteToken(name);
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
return Result.success(res);
} catch (Exception e) {
e.printStackTrace();
@@ -80,24 +74,6 @@ public Result seleteToken(@RequestParam("name") String name){
}
}
-<<<<<<< HEAD
-=======
-// @GetMapping("seletePoolToken")
-// public Result seleteToken(){
-// try {
-// String res = autoTokenController.getPoolToken();
-// if(res != null){
-// return Result.success(res);
-// }
-// else{
-// return Result.error("获取pool_token失败,请检查是否生成!");
-// }
-// } catch (Exception e) {
-// e.printStackTrace();
-// return Result.error("获取pool_token失败");
-// }
-// }
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
/**
* @param token
@@ -162,14 +138,6 @@ public Result deleteToken(@RequestParam String name){
}
}
-
-<<<<<<< HEAD
-=======
-
-
-
-
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
/**
* @return 通过访问restart,重启PandoraNext服务
*/
@@ -274,22 +242,14 @@ public Result reloadContainer(){
systemSetting systemSetting = systemService.selectSetting();
String bingUrl = systemSetting.getBing();
String[] parts = bingUrl.split(":");
-<<<<<<< HEAD
String baseUrlWithoutPath = "http://" + externalIP + ":" + parts[1] + "/" +systemSetting.getProxy_api_prefix();
-=======
- String baseUrlWithoutPath = "http://" + externalIP + ":" + parts[1];
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
+
if (parts.length != 2) {
return Result.error("bind填写有误,无法提取port");
}
log.info("重载的PandoraNext服务Url:"+baseUrlWithoutPath);
-<<<<<<< HEAD
+
String reloadCommand = "curl -i " + baseUrlWithoutPath + reloadUrl + "\"";
-=======
- String cookiesSetupPassword = systemSetting.getCookiesSetupPassword();
- String reloadCommand = "curl -i -w \"\\n%{http_code}\\n\" -b \"_Secure-next-auth.setup-password="
- + cookiesSetupPassword + ";\" -X POST \"" + baseUrlWithoutPath + reloadUrl + "\"";
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
// 执行重载进程的命令
Process reloadProcess = executeCommand(reloadCommand);
log.info("重载命令:"+reloadCommand);
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/loginColltroller.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/loginColltroller.java
index 76206ed..d95748b 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/loginColltroller.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/loginColltroller.java
@@ -2,20 +2,10 @@
import com.yyandywt99.pandoraNext.pojo.Result;
import com.yyandywt99.pandoraNext.pojo.systemSetting;
-<<<<<<< HEAD
-=======
-<<<<<<< HEAD
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
import com.yyandywt99.pandoraNext.service.impl.systemServiceImpl;
import com.yyandywt99.pandoraNext.service.loginService;
import com.yyandywt99.pandoraNext.util.JwtUtils;
import io.jsonwebtoken.Claims;
-<<<<<<< HEAD
-=======
-=======
-import com.yyandywt99.pandoraNext.service.loginService;
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
@@ -34,18 +24,10 @@
public class loginColltroller {
@Autowired
private loginService loginService;
-<<<<<<< HEAD
@Autowired
private systemServiceImpl systemService;
-=======
-<<<<<<< HEAD
- @Autowired
- private systemServiceImpl systemService;
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
/**
* 登录用户接口
* @return "jwt令牌!"or"NOT_LOGIN"
@@ -53,10 +35,6 @@ public class loginColltroller {
@PostMapping("/login")
public Result login(@RequestBody systemSetting setting) {
String res = loginService.login(setting);
-<<<<<<< HEAD
- log.info(res);
-=======
-<<<<<<< HEAD
log.info(res);
if(res.contains("登录成功")){
String password = setting.getLoginPassword();
@@ -65,21 +43,6 @@ public Result login(@RequestBody systemSetting setting) {
Map chaims = new HashMap();
chaims.put("password",password);
String s = JwtUtils.generateJwt(chaims);
-=======
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
- if(res.contains("登录成功")){
- String password = setting.getLoginPassword();
- JwtUtils.setSignKey(password);
- log.info("登录成功");
- Map chaims = new HashMap();
-<<<<<<< HEAD
- chaims.put("password",password);
- String s = JwtUtils.generateJwt(chaims);
-=======
- chaims.put("id",1);
- String s = com.yyandywt99.pandoraNext.util.JwtUtils.generateJwt(chaims);
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
return Result.success(s);
}
return Result.error("登陆失败");
@@ -91,55 +54,31 @@ public Result login(@RequestBody systemSetting setting) {
*/
@PostMapping("/loginToken")
public Result loginToken(@RequestParam("token") String token){
-<<<<<<< HEAD
- String password = systemService.selectSetting().getLoginPassword();
- JwtUtils.setSignKey(password);
-=======
-<<<<<<< HEAD
+
String password = systemService.selectSetting().getLoginPassword();
JwtUtils.setSignKey(password);
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
log.info(token);
if(!StringUtils.hasLength(token)){
log.info("请求头token为空,返回未登录的信息");
return Result.error("NOT_LOGIN");
}
try {
-<<<<<<< HEAD
-=======
-<<<<<<< HEAD
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
+
Claims claims = JwtUtils.parseJWT(token);
String res = claims.get("password").toString();
if(res.equals(password)){
log.info("令牌合法,可以正常登录");
return Result.success("YES_LOGIN");
}
-<<<<<<< HEAD
-=======
-=======
+
com.yyandywt99.pandoraNext.util.JwtUtils.parseJWT(token);
log.info("令牌合法,可以正常登录");
return Result.success("YES_LOGIN");
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
} catch (Exception e) {//jwt解析失败
e.printStackTrace();
log.info("解析令牌失败, 返回未登录错误信息");
Result error = Result.error("NOT_LOGIN");
return error;
}
-<<<<<<< HEAD
- Result error = Result.error("NOT_LOGIN");
- return error;
-=======
-<<<<<<< HEAD
- Result error = Result.error("NOT_LOGIN");
- return error;
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
->>>>>>> a01050d85eea9b18e5166217a20b6fd0187faa2e
}
}
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/systemColltroller.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/systemColltroller.java
index 99c6c04..1cb331f 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/systemColltroller.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/systemColltroller.java
@@ -37,10 +37,6 @@ public Result requireSetting(@RequestBody systemSetting setting){
}
}
-<<<<<<< HEAD
-
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
/**
* 选择config.json里的系统值
* @return "修改成功!"or"修改失败"
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/tokenController.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/tokenController.java
index f4ecb18..a4a8685 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/tokenController.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/controller/tokenController.java
@@ -30,11 +30,7 @@ public class tokenController {
public Result getSharedToken(@RequestParam("password") String password){
List res = new ArrayList<>();
if(password.equals(systemService.selectSetting().getGetTokenPassword())){
-<<<<<<< HEAD
for (token token : apiService.selectToken("")) {
-=======
- for (token token : apiService.seleteToken("")) {
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
res.add(token.getShare_token());
}
return Result.success(res);
@@ -48,11 +44,7 @@ public Result getSimplySharedToken(@RequestParam("password") String password,
@RequestParam("tokenName") String tokenName){
List res = new ArrayList<>();
if(password.equals(systemService.selectSetting().getGetTokenPassword())){
-<<<<<<< HEAD
for (token token : apiService.selectToken("")) {
-=======
- for (token token : apiService.seleteToken("")) {
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
if(token.getName().equals(tokenName)){
if(token.getShare_token() != null){
return Result.success(token.getShare_token());
@@ -73,11 +65,7 @@ public Result getSimplySharedToken(@RequestParam("password") String password,
public Result getAccessToken(@RequestParam("password") String password){
List res = new ArrayList<>();
if(password.equals(systemService.selectSetting().getGetTokenPassword())){
-<<<<<<< HEAD
for (token token : apiService.selectToken("")) {
-=======
- for (token token : apiService.seleteToken("")) {
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
res.add(token.getAccess_token());
}
return Result.success(res);
@@ -91,11 +79,7 @@ public Result getSimplyAccessToken(@RequestParam("password") String password,
@RequestParam("tokenName") String tokenName){
List res = new ArrayList<>();
if(password.equals(systemService.selectSetting().getGetTokenPassword())){
-<<<<<<< HEAD
for (token token : apiService.selectToken("")) {
-=======
- for (token token : apiService.seleteToken("")) {
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
if(token.getName().equals(tokenName)){
if(token.getAccess_token() != null){
return Result.success(token.getAccess_token());
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/interceptor/LoginCheckInterceptor.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/interceptor/LoginCheckInterceptor.java
index f88bc93..66fb725 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/interceptor/LoginCheckInterceptor.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/interceptor/LoginCheckInterceptor.java
@@ -2,10 +2,6 @@
import com.alibaba.fastjson.JSONObject;
import com.yyandywt99.pandoraNext.pojo.Result;
-<<<<<<< HEAD
-=======
-import com.yyandywt99.pandoraNext.util.JwtUtils;
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
@@ -18,10 +14,6 @@
@Slf4j
@Component
public class LoginCheckInterceptor implements HandlerInterceptor {
-<<<<<<< HEAD
-
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
@Override //目标资源方法运行前运行, 返回true: 放行, 放回false, 不放行
public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception {
//1.获取请求url。
@@ -50,11 +42,7 @@ public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Objec
jwt = jwt.substring(7);
//5.解析token,如果解析失败,返回错误结果(未登录)。
try {
-<<<<<<< HEAD
com.yyandywt99.pandoraNext.util.JwtUtils.parseJWT(jwt);
-=======
- JwtUtils.parseJWT(jwt);
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
} catch (Exception e) {//jwt解析失败
e.printStackTrace();
log.info("解析令牌失败, 返回未登录错误信息");
@@ -64,11 +52,6 @@ public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Objec
resp.getWriter().write(notLogin);
return false;
}
-<<<<<<< HEAD
-=======
-
- //6.放行。
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
log.info("令牌合法, 放行");
return true;
}
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/pojo/systemSetting.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/pojo/systemSetting.java
index 322c9e6..1d5af96 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/pojo/systemSetting.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/pojo/systemSetting.java
@@ -103,21 +103,9 @@ public class systemSetting {
*/
private String proxy_api_prefix;
-
-<<<<<<< HEAD
-=======
- /** 4.5
- * PandoraNext 重载session密码
- */
- private String cookiesSetupPassword;
-
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
/**
* PandoraNext pool_token
*/
private String pool_token;
-<<<<<<< HEAD
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
}
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/apiService.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/apiService.java
index 7cd3eb6..f07dfc4 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/apiService.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/apiService.java
@@ -13,12 +13,7 @@ public interface apiService {
String addToken(token token) throws IOException;
-<<<<<<< HEAD
List selectToken(String name);
-=======
- List seleteToken(String name);
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
-
String requiredToken(token tem);
String deleteToken(String name);
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/impl/apiServiceImpl.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/impl/apiServiceImpl.java
index 0f594a4..8dde87d 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/impl/apiServiceImpl.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/impl/apiServiceImpl.java
@@ -21,14 +21,20 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
+import javax.ws.rs.HEAD;
import java.io.*;
-import java.net.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
/**
* @author Yangyang
@@ -101,11 +107,7 @@ public String selectFile() throws IOException {
* @return res(List )
*/
@Override
-<<<<<<< HEAD
public List selectToken(String name) {
-=======
- public List seleteToken(String name) {
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
List res = new ArrayList<>();
try {
String parent = selectFile();
@@ -579,11 +581,7 @@ public String getPoolToken(String pool_token) {
// 使用MultipartEntityBuilder构建表单数据
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
-<<<<<<< HEAD
List tokens = selectToken("");
-=======
- List tokens = seleteToken("");
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
StringBuffer resToken = new StringBuffer();
for(token token : tokens){
if(token.getShare_token() != null && token.isSetPoolToken() ){
@@ -663,11 +661,7 @@ public token autoUpdateSimpleToken(token token) {
* @return "更新成功" or "更新失败"
*/
public String autoUpdateToken(String name) {
-<<<<<<< HEAD
List resTokens = selectToken(name);
-=======
- List resTokens = seleteToken(name);
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
int newToken = 0;
for (token token : resTokens) {
token res = autoUpdateSimpleToken(token);
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/impl/systemServiceImpl.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/impl/systemServiceImpl.java
index c61562c..7fec310 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/impl/systemServiceImpl.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/service/impl/systemServiceImpl.java
@@ -4,10 +4,7 @@
import com.yyandywt99.pandoraNext.pojo.tls;
import com.yyandywt99.pandoraNext.pojo.validation;
import com.yyandywt99.pandoraNext.service.systemService;
-<<<<<<< HEAD
import com.yyandywt99.pandoraNext.util.JwtUtils;
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
import lombok.extern.slf4j.Slf4j;
import org.json.JSONArray;
import org.json.JSONException;
@@ -15,6 +12,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
+import javax.ws.rs.HEAD;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
@@ -95,29 +93,15 @@ public String requiredSetting(systemSetting tem){
updateJsonValue(jsonObject,"license_id",tem.getLicense_id());
updateJsonValue(jsonObject,"loginUsername",tem.getLoginUsername());
updateJsonValue(jsonObject,"loginPassword",tem.getLoginPassword());
-<<<<<<< HEAD
+
if(tem.getLoginPassword()!= null && tem.getLoginPassword().length() > 0){
JwtUtils.setSignKey(tem.getLoginPassword());
}
-
-
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
updateJsonValue(jsonObject,"autoToken_url",tem.getAutoToken_url());
updateJsonValue(jsonObject,"getTokenPassword",tem.getGetTokenPassword());
updateJsonValue(jsonObject,"containerName",tem.getContainerName());
-<<<<<<< HEAD
-// //4.5
-// //重载cookies密码
-// updateJsonValue(jsonObject,"cookiesSetupPassword",tem.getCookiesSetupPassword());
-=======
- //4.5
- //重载cookies密码
- updateJsonValue(jsonObject,"cookiesSetupPassword",tem.getCookiesSetupPassword());
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
-
updateJsonValue(jsonObject,"isolated_conv_title",tem.getIsolated_conv_title());
updateJsonValue(jsonObject,"proxy_api_prefix",tem.getProxy_api_prefix());
@@ -234,25 +218,6 @@ public systemSetting selectSetting(){
exist = false;
}
- //4.5
-<<<<<<< HEAD
-// try {
-// jsonObject.getString("cookiesSetupPassword");
-// } catch (JSONException e) {
-// jsonObject.put("cookiesSetupPassword", "_Secure-next-auth.setup-password");
-// log.info("config.json没有新增cookiesSetupPassword参数,现已增加!");
-// exist = false;
-// }
-=======
- try {
- jsonObject.getString("cookiesSetupPassword");
- } catch (JSONException e) {
- jsonObject.put("cookiesSetupPassword", "_Secure-next-auth.setup-password");
- log.info("config.json没有新增cookiesSetupPassword参数,现已增加!");
- exist = false;
- }
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
-
try {
jsonObject.getString("isolated_conv_title");
} catch (JSONException e) {
@@ -279,22 +244,12 @@ public systemSetting selectSetting(){
config.setLoginUsername(jsonObject.getString("loginUsername"));
config.setLoginPassword(jsonObject.getString("loginPassword"));
-<<<<<<< HEAD
-=======
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
config.setLicense_id(jsonObject.getString("license_id"));
config.setAutoToken_url(jsonObject.getString("autoToken_url"));
config.setGetTokenPassword(jsonObject.getString("getTokenPassword"));
config.setContainerName(jsonObject.getString("containerName"));
- //4.5
-<<<<<<< HEAD
-// config.setCookiesSetupPassword(jsonObject.getString("cookiesSetupPassword"));
-=======
- config.setCookiesSetupPassword(jsonObject.getString("cookiesSetupPassword"));
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
-
// 4.0
config.setIsolated_conv_title(jsonObject.getString("isolated_conv_title"));
config.setProxy_api_prefix(jsonObject.getString("proxy_api_prefix"));
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/tokensToolApplication.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/tokensToolApplication.java
index d2f338a..0ea14f3 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/tokensToolApplication.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/tokensToolApplication.java
@@ -1,17 +1,8 @@
package com.yyandywt99.pandoraNext;
-<<<<<<< HEAD
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-=======
-import com.yyandywt99.pandoraNext.config.TaskSchedulerConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.Import;
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
import org.springframework.scheduling.annotation.EnableScheduling;
/**
@@ -21,12 +12,10 @@
/**
* 定时注解
*/
-<<<<<<< HEAD
-=======
-@Import(TaskSchedulerConfig.class)
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
+
+
/**
* 定时注解
*/
@@ -34,14 +23,8 @@
@EnableScheduling
@SpringBootApplication
public class tokensToolApplication {
-<<<<<<< HEAD
public static void main(String[] args) {
log.info("PandoraNext-tokensTool v 0.4.7.1 版本,修改了jwt的漏洞问题,感谢您的使用!");
-=======
-
- public static void main(String[] args) {
- log.info("PandoraNext-tokensTool v 0.4.7 版本,感谢您的使用!");
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
SpringApplication.run(tokensToolApplication.class, args);
}
diff --git a/rearServer/src/main/java/com/yyandywt99/pandoraNext/util/JwtUtils.java b/rearServer/src/main/java/com/yyandywt99/pandoraNext/util/JwtUtils.java
index 7c401b9..2d12454 100644
--- a/rearServer/src/main/java/com/yyandywt99/pandoraNext/util/JwtUtils.java
+++ b/rearServer/src/main/java/com/yyandywt99/pandoraNext/util/JwtUtils.java
@@ -1,5 +1,4 @@
package com.yyandywt99.pandoraNext.util;
-<<<<<<< HEAD
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
@@ -8,11 +7,6 @@
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-=======
-import io.jsonwebtoken.Claims;
-import io.jsonwebtoken.Jwts;
-import io.jsonwebtoken.SignatureAlgorithm;
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
import java.util.Date;
import java.util.Map;
@@ -22,7 +16,7 @@
*/
-<<<<<<< HEAD
+
@Slf4j
@Data
@NoArgsConstructor
@@ -57,11 +51,7 @@ public class JwtUtils {
public static String generateJwt(Map claims){
String jwt = Jwts.builder()
.addClaims(claims)
-<<<<<<< HEAD
.signWith(SignatureAlgorithm.HS256, getSignKey())
-=======
- .signWith(SignatureAlgorithm.HS256, signKey)
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
.setExpiration(new Date(System.currentTimeMillis() + expire))
.compact();
return jwt;
@@ -74,11 +64,7 @@ public static String generateJwt(Map claims){
*/
public static Claims parseJWT(String jwt){
Claims claims = Jwts.parser()
-<<<<<<< HEAD
.setSigningKey(getSignKey())
-=======
- .setSigningKey(signKey)
->>>>>>> bcd58edf7697081bd86d12c983b1afcac8db4495
.parseClaimsJws(jwt)
.getBody();
return claims;
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/apiController.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/apiController.class
index 8c12e76..196a865 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/apiController.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/apiController.class differ
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/loginColltroller.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/loginColltroller.class
index 9e2caa5..89dfeb4 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/loginColltroller.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/loginColltroller.class differ
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/systemColltroller.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/systemColltroller.class
index 55b1ea8..e6f6738 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/systemColltroller.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/controller/systemColltroller.class differ
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/interceptor/LoginCheckInterceptor.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/interceptor/LoginCheckInterceptor.class
index 7f5a604..1c8e91b 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/interceptor/LoginCheckInterceptor.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/interceptor/LoginCheckInterceptor.class differ
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/pojo/systemSetting.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/pojo/systemSetting.class
index e5d11d7..6059492 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/pojo/systemSetting.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/pojo/systemSetting.class differ
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/service/impl/apiServiceImpl.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/service/impl/apiServiceImpl.class
index 5b4dba6..a8bc113 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/service/impl/apiServiceImpl.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/service/impl/apiServiceImpl.class differ
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/service/impl/systemServiceImpl.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/service/impl/systemServiceImpl.class
index d059e8a..530d376 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/service/impl/systemServiceImpl.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/service/impl/systemServiceImpl.class differ
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/tokensToolApplication.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/tokensToolApplication.class
index 23aafbc..68c4cc6 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/tokensToolApplication.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/tokensToolApplication.class differ
diff --git a/rearServer/target/classes/com/yyandywt99/pandoraNext/util/JwtUtils.class b/rearServer/target/classes/com/yyandywt99/pandoraNext/util/JwtUtils.class
index 50a97a2..06c76f8 100644
Binary files a/rearServer/target/classes/com/yyandywt99/pandoraNext/util/JwtUtils.class and b/rearServer/target/classes/com/yyandywt99/pandoraNext/util/JwtUtils.class differ