build fixed

master
Marc Wäckerlin 7 years ago
parent f088cad616
commit 473aaa322f
  1. 5
      ax_init_standard_project.m4
  2. 6
      etc/authentication.php
  3. 2
      etc/makefile.am
  4. 6
      etc/settings.php
  5. 4
      html/index.php
  6. 1
      html/makefile.am
  7. 2
      makefile.am

@ -573,6 +573,11 @@ distclean-rpm-targets:
EOF
])
# use this in configure.ac to support scripts, e.g. bash scripts
AC_DEFUN([AX_USE_ETC], [
AC_CONFIG_FILES([etc/makefile])
])
# use this in configure.ac to support scripts, e.g. bash scripts
AC_DEFUN([AX_USE_SCRIPTS], [
AC_CONFIG_FILES([scripts/makefile])

@ -1,9 +1,7 @@
<?php
$realm = "MY REALM HERE";
$ldaphost = "my.ldap.host";
$base = "dc=my,dc=server,dc=com";
$userbase = "ou=people,".$base;
$groupbase = "ou=group,".$base;
$ldapbase = "dc=my,dc=server,dc=com";
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="'.$REALM.'"');
header('HTTP/1.0 401 Unauthorized');
@ -17,7 +15,7 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
or error_die("failed to set LDAP protocol version 3");
ldap_start_tls($ldapconn)
or error_die($ldapconn, "cannot start LDAP TLS");
$ldapbind = @ldap_bind($ldapconn, 'uid='.$tstusername.','.$userbase, $password)
$ldapbind = @ldap_bind($ldapconn, 'uid='.$tstusername.','.$ldapbase, $password)
or error_die("login failed for $username", '403 Forbidden');
$username = $tstuserbname;
}

@ -8,6 +8,6 @@
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
pkgsysconfdir = ${sysconfdir}/@PACKAGE_NAME@
pkgsysconfdir = ${PKGSYSCONFDIR}
dist_pkgsysconf_DATA = settings.php authentication.php

@ -1,5 +1,5 @@
<?php
$path='/path/to/your/files';
$thumbs='/var/tmp/sahring-gallery/thumbnails/';
$max_validity_days=30;
$path = "/path/to/your/files";
$thumbs = "/var/tmp/sharing-gallery/thumbnails/";
$max_validity_days = "30";
?>

@ -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>';

@ -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

@ -8,7 +8,7 @@
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
SUBDIRS = html doc
SUBDIRS = etc html doc
doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog

Loading…
Cancel
Save