diff --git a/configure.ac b/configure.ac index 8d3dddf..6d1f3d3 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,7 @@ AX_BUILD_HTML #AX_QT_NO_KEYWORDS AX_DEB_SECTION(web) -AX_DEB_DEPEND(php-patchwork-utf8, php-mbstring, php-imagick, php-gnupg, php-ldap, php-mcrypt, php-bz2) +AX_DEB_DEPEND(php-patchwork-utf8, php-mbstring, php-imagick, php-gnupg, php-ldap, php-mcrypt, php-bz2, php-mail) AX_DEB_RESOLVE AC_CONFIG_FILES([html/configuration.php]) diff --git a/etc/authentication.php b/etc/authentication.php index 236353c..8817208 100644 --- a/etc/authentication.php +++ b/etc/authentication.php @@ -23,6 +23,9 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) { ldap_start_tls($ldapconn) or error_die($ldapconn, "cannot start LDAP TLS"); if ($ldapbind = @ldap_bind($ldapconn, $checkuser.'='.$tstusername.','.$ldapbase, $password)) { + ldap_bind($ldap, 'username', 'password'); + $search = ldap_search($ldapconn, 'base_dn', 'search_filter', array('mail', 'cn')); + $data = ldap_get_entries($ldap, $search); ldap_close($ldapconn); $username = $tstusername; } else { diff --git a/etc/settings.php b/etc/settings.php index 8db35e8..7a1fa5e 100644 --- a/etc/settings.php +++ b/etc/settings.php @@ -4,4 +4,8 @@ $thumbpath = "/var/tmp/sharing-gallery/thumbnails/"; $max_validity_days = "30"; $font = "DejaVu-Sans"; $preview_num = "5"; +$default_mail_subject = "Sharing Gallery: See my Fotos"; +$default_mail_text = "Fotos from my gallery:\n\npassword = PASSWORD\n\nlink: LINK\n\nRegards\nUSERNAME"; +$default_mailto = ""; +$fallback_mail_replyto = ""; ?> \ No newline at end of file diff --git a/html/index.php b/html/index.php index c8a0c50..f2bb876 100644 --- a/html/index.php +++ b/html/index.php @@ -158,6 +158,12 @@ } if (!isset($_REQUEST['secret'])) { if ($username=="") error_die('not authorized', '403 Forbidden'); + ?> +
+ ++