From d2e58ba46b9ac334b3abab863927b2c3f8bb191c Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 20 十月 2022 23:24:33 +0800 Subject: [PATCH] fix 修复 升级 nginx 1.21.6 => 1.22.1 修复漏洞 https://www.oschina.net/news/214309 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index 6525d31..a573fda 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -98,6 +98,24 @@ } /** + * 鏍规嵁瑙掕壊ID鏌ヨ鏉冮檺 + * + * @param roleId 瑙掕壊ID + * @return 鏉冮檺鍒楄〃 + */ + @Override + public Set<String> selectMenuPermsByRoleId(Long roleId) { + List<String> perms = baseMapper.selectMenuPermsByRoleId(roleId); + Set<String> permsSet = new HashSet<>(); + for (String perm : perms) { + if (StringUtils.isNotEmpty(perm)) { + permsSet.addAll(Arrays.asList(perm.trim().split(","))); + } + } + return permsSet; + } + + /** * 鏍规嵁鐢ㄦ埛ID鏌ヨ鑿滃崟 * * @param userId 鐢ㄦ埛鍚嶇О @@ -429,7 +447,7 @@ * @return */ public String innerLinkReplaceEach(String path) { - return StringUtils.replaceEach(path, new String[]{Constants.HTTP, Constants.HTTPS}, + return StringUtils.replaceEach(path, new String[]{Constants.HTTP, Constants.HTTPS, Constants.WWW, "." }, new String[]{"", ""}); } } -- Gitblit v1.9.3