Skip to content
Snippets Groups Projects
Commit d6a4a040 authored by Michael Hamann's avatar Michael Hamann
Browse files

Use md5 of the id in the subscription lockdir. FS#2112

Filenames can't contain ":" on windows and the lock directory contained
the unescaped page id. The lock function tries in an endless loop to
create the lock directory when it fails and the directory doesn't exist.
Just escaping the directory name won't work as then the filename length
limit will be quickly hit when using deep namespace structures with utf8
names. Thus using the md5sum seems to be the best solution. Perhaps the
lock function could also be changed to create a file with that name that
contains the id so the id can be retrieved for debugging purposes.
parent 6e0b4b67
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ function subscription_filename($id) {
*/
function subscription_lock_filename ($id){
global $conf;
return $conf['lockdir'].'/_subscr_' . $id . '.lock';
return $conf['lockdir'].'/_subscr_' . md5($id) . '.lock';
}
function subscription_lock($id) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment