summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2015-02-25 13:24:39 +0000
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2015-02-25 13:24:39 +0000
commit695f43a1edd757a79281d62a8696fa2cd02e8548 (patch)
treeaaa428371471e64a9046dc3b555412d8fe47c703 /apps
parentf5b62267325415b307cf2d47b69d11d4337536e4 (diff)
parent165afb004b68d0429c6e65e296a4508308929f26 (diff)
downloadnextcloud-server-695f43a1edd757a79281d62a8696fa2cd02e8548.tar.gz
nextcloud-server-695f43a1edd757a79281d62a8696fa2cd02e8548.zip
Merge pull request #10735 from owncloud/use_remote_addr
Use getRemoteAddress which supports reverse proxies
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/ajax/publicpreview.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/ajax/publicpreview.php b/apps/files_sharing/ajax/publicpreview.php
index ffb6f8d3147..1b61c08c2ac 100644
--- a/apps/files_sharing/ajax/publicpreview.php
+++ b/apps/files_sharing/ajax/publicpreview.php
@@ -68,7 +68,7 @@ if($linkedItem['item_type'] === 'folder') {
$isValid = \OC\Files\Filesystem::isValidPath($file);
if(!$isValid) {
\OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
- \OC_Log::write('core-preview', 'Passed filename is not valid, might be malicious (file:"' . $file . '";ip:"' . $_SERVER['REMOTE_ADDR'] . '")', \OC_Log::WARN);
+ \OC_Log::write('core-preview', 'Passed filename is not valid, might be malicious (file:"' . $file . '";ip:"' . \OC::$server->getRequest()->getRemoteAddress() . '")', \OC_Log::WARN);
exit;
}
$sharedFile = \OC\Files\Filesystem::normalizePath($file);