Merge pull request #4228 from nextcloud/stable11-error-messages

[Stable11] Error messages
This commit is contained in:
Morris Jobke 2017-04-06 00:30:10 -05:00 committed by GitHub
commit 190ccef819
3 changed files with 5 additions and 4 deletions

View File

@ -23,7 +23,7 @@
<a href="<?php p($_['downloadLink']); ?>" class="button<?php if ($_['updaterEnabled']) { p(' hidden'); } ?>"><?php p($l->t('Download now')) ?></a> <a href="<?php p($_['downloadLink']); ?>" class="button<?php if ($_['updaterEnabled']) { p(' hidden'); } ?>"><?php p($l->t('Download now')) ?></a>
<?php } ?> <?php } ?>
<?php } else { ?> <?php } else { ?>
<strong><?php print_unescaped($l->t('Your version is up to date.')); ?></strong> <strong><?php p($l->t('Your version is up to date.')); ?></strong>
<span class="icon-info svg" title="<?php p($l->t('Checked on %s', [$lastCheckedDate])) ?>"></span> <span class="icon-info svg" title="<?php p($l->t('Checked on %s', [$lastCheckedDate])) ?>"></span>
<?php } ?> <?php } ?>

View File

@ -3,7 +3,7 @@
<li class='error'> <li class='error'>
<?php p($error['error']) ?><br> <?php p($error['error']) ?><br>
<?php if(isset($error['hint']) && $error['hint']): ?> <?php if(isset($error['hint']) && $error['hint']): ?>
<p class='hint'><?php print_unescaped($error['hint']) ?></p> <p class='hint'><?php p($error['hint']) ?></p>
<?php endif;?> <?php endif;?>
</li> </li>
<?php endforeach ?> <?php endforeach ?>

View File

@ -380,9 +380,10 @@ class Local extends \OC\Files\Storage\Common {
} }
if (substr($realPath, 0, $this->dataDirLength) === $this->realDataDir) { if (substr($realPath, 0, $this->dataDirLength) === $this->realDataDir) {
return $fullPath; return $fullPath;
} else {
throw new ForbiddenException("Following symlinks is not allowed ('$fullPath' -> '$realPath' not inside '{$this->realDataDir}')", false);
} }
\OCP\Util::writeLog('core', "Following symlinks is not allowed ('$fullPath' -> '$realPath' not inside '{$this->realDataDir}')", \OCP\Util::ERROR);
throw new ForbiddenException('Following symlinks is not allowed', false);
} }
/** /**