Skip to content

Commit f8442b3

Browse files
committed
Fixed: FS#1737 - WebDAV - PHP files
Fixed: PHP notice in tform_actions.inc.php
1 parent ff765b8 commit f8442b3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

interface/lib/classes/tform_actions.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function onUpdate() {
139139
session_write_close();
140140
header($redirect);
141141
// When a returnto variable is set
142-
} elseif ($_SESSION["s"]["form"]["return_to_url"] != '') {
142+
} elseif (isset($_SESSION["s"]["form"]["return_to_url"]) && $_SESSION["s"]["form"]["return_to_url"] != '') {
143143
$redirect = $_SESSION["s"]["form"]["return_to_url"];
144144
$_SESSION["s"]["form"]["return_to_url"] = '';
145145
session_write_close();

server/conf/vhost.conf.master

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@
203203
</IfModule>
204204

205205
<IfModule mod_dav_fs.c>
206+
# Do not execute PHP files in webdav directory
207+
<Directory {tmpl_var name='document_root'}/webdav>
208+
<FilesMatch "\.ph(p3?|tml)$">
209+
SetHandler None
210+
</FilesMatch>
211+
</Directory>
206212
# DO NOT REMOVE THE COMMENTS!
207213
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
208214
# WEBDAV BEGIN
@@ -411,6 +417,12 @@
411417
</IfModule>
412418

413419
<IfModule mod_dav_fs.c>
420+
# Do not execute PHP files in webdav directory
421+
<Directory {tmpl_var name='document_root'}/webdav>
422+
<FilesMatch "\.ph(p3?|tml)$">
423+
SetHandler None
424+
</FilesMatch>
425+
</Directory>
414426
# DO NOT REMOVE THE COMMENTS!
415427
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
416428
# WEBDAV BEGIN

0 commit comments

Comments
 (0)