问题标签 [sessionid]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
234 浏览

session - IE8 sessionID 递增

我的页面是用经典的 ASP 和 href 元素编写的。Href 指向同一页面,但带有另一个查询参数。

单击链接后,所有会话变量都变得清晰。

使用 Response.Write(session.sessionID) 命令,我在单击链接之前和之后比较会话 ID。我发现它是自动递增的。

它只发生在 IE8 中,其他浏览器工作正常。

任何帮助表示赞赏!

0 投票
1 回答
1221 浏览

php - 我如何使用 php PHPSESSID 维护会话

我正在使用可编写脚本的网络浏览器(simplebrowser)http://www.lastcraft.com/browser_documentation.php ,它似乎没有办法:

  1. session_start();
  2. 设置 PHPSESSID 值
  3. 使用 simplebrowser 浏览几页
  4. session_destroy();

因此可以使用 php 函数来设置和维护使用 PHPSESSID 的会话

0 投票
1 回答
6086 浏览

asp.net - 获取会话 cookie 名称

是否可以获得中等信任级别的会话 cookie 名称?下面的代码在完全信任的情况下工作,但在中等信任级别引发安全异常。

0 投票
1 回答
1608 浏览

tomcat - 从 Tomcat 会话 ID 中检索 IP 地址?

基于Tomcat如何生成会话ID,有没有办法使用一些解码工具/方法从她的会话ID中检索客户端的IP地址?

使用 Tomcat 6。

注意:根本不确定它是否相关/可能。

问题可能是关于“如何生成 Tomcat 会话 ID,计算是否使用客户端 IP,有没有办法取回它”

编辑

万一这很重要,这是一次性使用,通过 Tomcat 6 生成的会话 ID 分析旧日志文件。我们并不是在寻找一种随着时间的推移而有效的实现。

0 投票
1 回答
801 浏览

struts - 关闭 cookie 的会话跟踪且 url 不应有会话 ID

我在 Struts 和 jsp 中工作。我需要关闭我的 cookie,因为我需要多标签浏览器支持。因此需要一个解决方案来隐藏 URL 中的会话 ID 并仍然跟踪会话。请注意,必须关闭 cookie,并且必须避免在 URL 中使用会话 ID。提前致谢。

0 投票
2 回答
734 浏览

php - JSP/Servlets 会话 + PHP:跟踪会话 - JSON/数据库还是 HttpSessionListener?

我已经实现了一个 Servlet,并且一个 PHP 站点正在访问该 Servlet 以检索数据。我想知道存储会话变量的最佳方法是什么,或者我是否应该存储它。

需要存储的变量包括 ArrayList 和其他对象。

我已经考虑了大约 3 种可能性:

(1) 实现 HttpSessionListener,并将每个会话(当它创建时)存储到静态 SessionMap 中。然后在会话被销毁后将其删除。

(2) 将所有内容存储在 JSON 中。所以我必须序列化/反序列化每个对象并来回传递它。(我想在用户点击之间跟踪每个 ArrayList/Object 中的项目列表。)

(3) 将信息存储在 MongoDB 中(随便挑一个),使用 SessionID 作为主键。

你们有什么感想?

0 投票
4 回答
2779 浏览

php - $_SERVER['HTTP_USER_AGENT'] 和 PHP 中的 session_regenerate_id

在阅读了一篇关于 PHP 会话安全的精彩文章后。我在讨论中有两个问题。

1)$_SERVER['HTTP_USER_AGENT'] - 这会获取有关用户浏览器和其他详细信息的信息,并且由于一个人可以从另一台计算机访问他们的帐户,那么它有什么用处?

2)session_regenerate_id - 这会重新生成一个会话 id,我应该如何使用它?会话超时或关闭后是否删除了 session_id?

感谢您的所有帮助。我感谢每一个观点和回应。

0 投票
0 回答
444 浏览

wcf - 具有会话 ID 的 WCF 单例

我有一个映射到 1 个硬件设备(打印机)的 WCF 服务。我想通过客户端锁定/解锁打印机。

有没有办法制作该服务的单个实例并启用会话?所以我可以获得当前用户的会话ID?例如 OperationContext.Current.SessionID ?(将其保存在私有字段中,以便我可以同步对硬件设备的访问)

谢谢!

0 投票
0 回答
570 浏览

asp.net - iPhone App, WCF REST-based service, ASP.NET_SessionId and .ASPXAUTH

I plan to use WCF REST-based web services to communicate with an iPhone app. I'd like to maintain the ASP.NET_SessionId cookie and .ASPXAUTH cookie for the authenticated user across requests. Any suggestion on how you would accomplish this? Would it be a bad idea to send both cookies back and fourth in all requests for the authenticated user?

0 投票
6 回答
7624 浏览

php - Transfer session across server in PHP

I need to transfer the user session across servers. ie. If user logged in server1 and if the user exists in server2 , then I have to transfer the user session details to server2. For this I used the following technique

From server1, redirect user to http://server2/auth_from_server1.php?sessionid=12345 On server2 (internally, in the PHP code of auth_from_server1.php), do a request to http://server1/secret/check_session_id.php with the sessionid, 12345. On server1, in the implementation of check_session_id.php, validate the ID and return OK, FAILURE, and session related data you want to pass, such as username, ... On server2, when the call returns with OK, store the transferred session data, and give the user a cookie and session for this server.

But when the call back function call the auth_from_server1.php the value in session id is null. I tryed to check the sessionid as

But $_SESSION['sessionId'] is null. In login page I am setting the value for session id as

Thanks in advance....