新版仿ok交易所-后端
1
zj
2025-06-18 2ee9dbc37cbe186e98e5ca458033ba517b981d0d
trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/TokenStore.java
@@ -257,15 +257,18 @@
            int expiresIn = getExpiresIn(sysType);
            long second = 1000L;
            if (System.currentTimeMillis() - createTokenTime > expiresIn * second) {
                logger.error("登录token已过期");
                throw new YamiShopBindException(403,"token error");
            }
        }
        catch (Exception e) {
        }catch (Exception e) {
            logger.error("登录token异常"+e.getMessage());
            e.printStackTrace();
            throw new YamiShopBindException(403,"token error");
        }
        // 防止解密后的token是脚本,从而对redis进行攻击,uuid只能是数字和小写字母
        if (!PrincipalUtil.isSimpleChar(decryptToken)) {
            logger.error("token解密异常:"+decryptStr);
            throw new YamiShopBindException(403,"token error");
        }
        return decryptToken;