惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
Troy Hunt's Blog
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
C
CXSECURITY Database RSS Feed - CXSecurity.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Latest
Security Latest
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MyScale Blog
MyScale Blog
Recorded Future
Recorded Future
A
About on SuperTechFans
PCI Perspectives
PCI Perspectives
H
Help Net Security
量子位
Blog — PlanetScale
Blog — PlanetScale
云风的 BLOG
云风的 BLOG
S
Security @ Cisco Blogs
The Hacker News
The Hacker News
P
Privacy International News Feed
Hacker News: Ask HN
Hacker News: Ask HN
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Threatpost
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Simon Willison's Weblog
Simon Willison's Weblog
有赞技术团队
有赞技术团队
博客园 - 司徒正美
J
Java Code Geeks
S
Securelist
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Security Archives - TechRepublic
Security Archives - TechRepublic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
S
Secure Thoughts
Latest news
Latest news
S
Security Affairs
T
The Exploit Database - CXSecurity.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
I
Intezer
雷峰网
雷峰网
Hacker News - Newest:
Hacker News - Newest: "LLM"
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

博客园 - zjhgx

hjdang 从jdk11升级到jdk25遇到的问题 腾讯云服务器遭受大量请求攻击导致网页打不开 capacitor的android项目接入穿山甲遇到的坑 class file for org.apache.shiro.lang.util.Nameable not found class file for org.apache.shiro.lang.util.Nameable not found 使用capacitor遇到的问题记录 android真机调试遇到的问题 用java爬取京东商品页注意点 SEO 经验记录 使用goaccess统计nginx日志 nginx日志按天分割 记一次流量爆发导致服务器无响应的记录 mac 安装完Navicat Premium 提示已损坏 无法打开的处理方法 腾讯云问题汇总 vue-element-admin npm install 错误 quasar <q-page>下面<div>自动计算height的问题 Adsense遇到的问题 web项目启动时dubbo报错: No provider available for the service com.davidhu.shopguide.api.service.UserEventService from the url zookeeper ://localhost:2181/org.apache.du quasar ssr模式出现了CLS issue vue ssr里面在template不能出现this,create时this还没有
shiro的cookie去掉domain后导致用户无法登陆
zjhgx · 2025-06-01 · via 博客园 - zjhgx

5月30号在测试app端hjdang的登陆时把shiro sessionManager中的下面这句注释掉了。结果有两个人说现在前端无法登陆。赶紧恢复代码,但发现在我的电脑上edge浏览器可以登陆,但chrome无法登陆。

cookie.setDomain("hjdang.com");
    @Bean
    public DefaultWebSessionManager sessionManager() {
        DefaultWebSessionManager sessionManager = new DefaultWebSessionManager();
        Cookie cookie = sessionManager.getSessionIdCookie();
        cookie.setName("Hjdang");
       // cookie.setDomain("hjdang.com");
        log.info("shiro cookie is {}", JsonUtil.toJSONString(cookie));
        sessionManager.setSessionIdCookie(cookie);
        sessionManager.setSessionDAO(redisSessionDAO());
        sessionManager.setGlobalSessionTimeout(24 * 60 * 60 * 1000);
        return sessionManager;
    }

仔细看了请求,发现islogin这个js方法的请求带的名为 “Hjdang” 的cookie有两个,domain分别为.hjdang.com和web.hjdang.com. 我想是不是后端根据cookie来取session时可能用了web.hjdang.com的,导致找不到session。于是chrome中清除历史的cookie。现在名为 “Hjdang” 的cookie只有一个了,domain分别为.hjdang.com。果然又可以登陆了。