build fixed

This commit is contained in:
Marc Wäckerlin
2017-02-26 21:28:18 +00:00
parent f088cad616
commit 473aaa322f
7 changed files with 15 additions and 11 deletions

View File

@@ -187,7 +187,7 @@
$secret = decrypt($_REQUEST['secret']) or error_die('bad password', '403 Forbidden');
if (!isset($secret['valid-until'])) error_die('missing validation date');
if (!isset($max_validity_days)) error_die('maximum validity days not set');
if (strtotime($secret['valid-until'])>time()+$max_validity_days*86400) error_die('validity limitation not respected');
if (strtotime($secret['valid-until'])>time()+((int)$max_validity_days)*86400) error_die('validity limitation not respected');
if (strtotime($secret['valid-until'])<time()) error_die('sharing request timed out', '410 Gone');
checkPath($secret['path']);
if (isset($secret['file'])) {
@@ -337,7 +337,7 @@
echo '<label for="password">Passwort:</label>';
echo '<input type="text" size="5" name="password" value="'.substr(str_shuffle(strtolower(sha1(rand().time()."SeAG6"))),0,4).'">';
echo '<label for="valid-until">Gültig bis:</label>';
echo '<input type="date" size="10" name="valid-until" max="'.date('Y-m-d', time()+$max_validity_days*86400).'" value="'.date('Y-m-d', time()+14*86400).'"/>';
echo '<input type="date" size="10" name="valid-until" max="'.date('Y-m-d', time()+((int)$max_validity_days)*86400).'" value="'.date('Y-m-d', time()+14*86400).'"/>';
echo '<input type="submit" name="share" value="Teilen"/>';
} else {
echo '<a href="?path='.urlencode($subpath).'&select">Auswahl-Modus</a>';

View File

@@ -12,5 +12,6 @@ EXTRA_DIST = configuration.php.in
wwwdir = ${pkgdatadir}/html
dist_www_DATA = folder.png .htaccess index.php
www_DATA = configuration.php
MAINTAINERCLEANFILES = makefile.in