Project

General

Profile

Actions

Bug #14597

open
WW RM

Setting session prefix and length fails with combined session tracking

Bug #14597: Setting session prefix and length fails with combined session tracking

Added by Wojciech Wil 2 months ago. Updated 18 days ago.

Status:
Implemented @Emweb
Priority:
Normal
Target version:
Start date:
06/15/2026
Due date:
% Done:

0%

Estimated time:

Description

Running hello example like so

../../build/examples/hello/hello.wt --docroot . --session-id-prefix=0 --http-listen 0.0.0.0:8080 -c ../../wt_config.xml.in

Where in example config file wt_config.xml.in the only changes are <session-id-length>15</session-id-length> and <tracking>Combined</tracking>. The goal was to have wtd with the same total length=16 but with '0' as prefix. When entering app in the browser it is stuck in infinite loop of creating new sessions. Wt version 4.11.4.

This seems to fix the issue in that case

--- a/src/web/WebController.C
+++ b/src/web/WebController.C
@@ -724,7 +724,7 @@ void WebController::handleRequest(WebRequest *request)
   if (conf_.sessionTracking() == Configuration::Combined)
     multiSessionCookie = sessionFromCookie(request->headerValue("Cookie"),
                                            "ms" + request->scriptName(),
-                                           conf_.sessionIdLength());
+                                           conf_.fullSessionIdLength());
 
   if (sessionId.empty() && wtdE)
     sessionId = *wtdE;

RM Updated by Romain Mardulyn 2 months ago Actions #1

Hi Wil,

This bug has already been fixed in later versions of Wt.

RM Updated by Romain Mardulyn about 2 months ago Actions #2

  • Status changed from New to Rejected

WW Updated by Wojciech Wil 27 days ago Actions #3

Hi Romain,

Just tested with latest version 4.14.0 and the problem is still present for that configuration in hello example app.

RM Updated by Romain Mardulyn 25 days ago Actions #4

  • Status changed from Rejected to New
  • Target version set to 4.14.2

This was indeed a mistake on my part.

RM Updated by Romain Mardulyn 19 days ago Actions #5

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn 19 days ago Actions #6

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

ED Updated by emil de keyser 19 days ago Actions #7

  • Assignee set to emil de keyser

ED Updated by emil de keyser 19 days ago Actions #8

  • Status changed from Review to Resolved
  • Assignee changed from emil de keyser to Romain Mardulyn

RM Updated by Romain Mardulyn 18 days ago Actions #9

  • Status changed from Resolved to Implemented @Emweb
Actions

Also available in: PDF Atom