Update UNC path handling#2591
Update UNC path handling#2591monkeyiq wants to merge 3 commits intosimplesamlphp:simplesamlphp-2.5from
Conversation
This ``` \\some-pc\some-share\some.key ``` Should result in ``` var_dump($ret); string(29) "//some-pc/some-share/some.key" ``` Which according to simplesamlphp#2586 should be able to be loaded. I only have a partial php win env so it needs verification against a real SSP install.
|
If this works, we should capture this case in a unit test |
|
I don't know if folks are running the httpd build for win most or something else these days. From my perspective apache makes it easier if that is commonish. I guess if I installed httpd at some stage and maybe set it up to rsync the code over to that box it would perhaps help with win testing. |
|
I now have a simple test case for this on windows. I have used a hack based on DIRECTORY_SEPARATOR to know if we are running on Win, perhaps there is a DEFINE or something that is more direct to use here instead. |
|
|
||
| /** | ||
| */ | ||
| public function testUNCpaths(): void |
There was a problem hiding this comment.
This is not right. If the separator is \\ then the UNC-path should also use backslashes?
There was a problem hiding this comment.
I think the UNC path should, I was looking at first at the comment from the original issue which mentions that php 8.2 seems to allow //server/path as well and work #2586 (comment)
If we are looking to make the returned path use '\' then we could change the rebuild code at
simplesamlphp/src/SimpleSAML/Utils/System.php
Line 163 in 5cae09a
and see what else falls over with that and try to get those ripple effects under control again.
|
I guess I should look at installing apache on the win box for testing too. I assume nobody else on the core team is looking to test / run things on a win machine. |
I don't have anything available that we can use right now. I intend to replace and improve my home lab, but with RAM prices going through the roof it'll have to wait.. Almost a thousand euro's for 64 GB :'( |
This
Should result in
Which according to
#2586 should be able to be loaded.
I only have a partial php win env so it needs verification against a real SSP install.