View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18566Bug reportsOtherpublic2023-05-17 23:27
Reporterollehar Assigned To 
PrioritylowSeveritypartial_block 
Status confirmedResolutionopen 
Summary18566: Resourcemanager(Filemanager, Resources) throws javascript errors in rare cases
Description

The reason the resource manager is not working is as follows:
See attach [https://bugs.limesurvey.org/file_download.php?file_id=16597&type=bug&show_inline=1&file_show_inline_token=20221223zw8L2wYBcgB19J5E5_-X6_NZmJdVg0Pn]

The reason why this doesn't work is that if you look at the line marked with x in the image, this value is used to set the cookie in the browser if a subdomain is detected. However, this fails if a port is set since browser cookies don't support ports. For the ip address with port a simple regex could be attached (1 in image)

$ip = '/^' . implode('\.', array($ip, $ip, $ip, $ip)) . '(:\d+)?$/';

The value for the line marked with x in the image could be changed to empty string just as the condition before, but this would make the whole condition irrelevant since you could just always set

$this->config['cookieDomain'] = "";

which sets the current domain as the cookie Domain, which is what we always want or is that a wrong assumption?

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)master
I will donate to the project if issue is resolvedNo
Browser-
Database type & version-
Server OS (if known)-
Webserver software & version (if known)-
PHP Version-

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2022-12-21 13:38

administrator   ~73236

image.png (58,297 bytes)   
image.png (58,297 bytes)   
DenisChenu

DenisChenu

2022-12-21 15:16

developer   ~73244

Where is this code ?

gabrieljenik

gabrieljenik

2022-12-23 13:58

manager   ~73303

image-2.png (4,891 bytes)   
image-2.png (4,891 bytes)   
DenisChenu

DenisChenu

2022-12-23 16:23

developer   ~73307

which sets the current domain as the cookie Domain, which is what we always want or is that a wrong assumption?

related ?

https://github.com/LimeSurvey/LimeSurvey/blob/00e9c24a175a32711721e68c3e4db5783b25ec96/application/helpers/admin/htmleditor_helper.php#L30-L35

gabrieljenik

gabrieljenik

2023-05-17 23:27

manager   ~75052

I couldn't even login when LS installed on someting like test.example.com:8080
Not following this one lately, so I am unassigning it from me. (following tibor advice :) )

Issue History

Date Modified Username Field Change
2022-12-21 13:38 ollehar New Issue
2022-12-21 13:38 ollehar Note Added: 73236
2022-12-21 13:38 ollehar File Added: image.png
2022-12-21 13:38 ollehar Bug heat 0 => 2
2022-12-21 13:41 ollehar Priority none => low
2022-12-21 13:42 ollehar Severity minor => partial_block
2022-12-21 15:16 DenisChenu Note Added: 73244
2022-12-21 15:16 DenisChenu Bug heat 2 => 4
2022-12-23 13:58 gabrieljenik Note Added: 73303
2022-12-23 13:58 gabrieljenik File Added: image-2.png
2022-12-23 13:58 gabrieljenik Bug heat 4 => 6
2022-12-23 13:58 gabrieljenik Assigned To => gabrieljenik
2022-12-23 13:58 gabrieljenik Status new => assigned
2022-12-23 13:59 gabrieljenik Description Updated
2022-12-23 14:03 gabrieljenik Steps to Reproduce Updated
2022-12-23 16:23 DenisChenu Note Added: 73307
2023-01-19 23:14 p_teichmann Steps to Reproduce Updated
2023-04-17 10:22 p_teichmann Summary Resourcemanager throws javascript errors in rare cases => Resourcemanager(Filemanager, Resources) throws javascript errors in rare cases
2023-05-17 23:27 gabrieljenik Note Added: 75052
2023-05-17 23:27 gabrieljenik Assigned To gabrieljenik =>
2023-05-17 23:27 gabrieljenik Status assigned => confirmed