From 1d8503a3f45b999877938caf20fb6777de0b5511 Mon Sep 17 00:00:00 2001
From: Marisa
Date: Fri, 21 Nov 2025 18:56:35 -0500
Subject: [PATCH] Upload files to "/"
---
index.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
index.php.tls | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 109 insertions(+)
create mode 100644 index.php
create mode 100644 index.php.tls
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..41d639e
--- /dev/null
+++ b/index.php
@@ -0,0 +1,54 @@
+Login successful! Welcome $uid
";
+ } else {
+ $msg = "Invalid credentials
";
+ }
+ } else {
+ $msg = "TLS failure
";
+ }
+ ldap_close($ldap);
+ } else {
+ $msg = "Please fill both fields
";
+ }
+}
+?>
+
+
+
+
+ ldapdock – LDAP login
+
+
+
+ ldapdock login
+ Server: = htmlspecialchars($host) ?>
+ = $msg ?>
+
+
+ Test user: marisa / qwerty
+
+
diff --git a/index.php.tls b/index.php.tls
new file mode 100644
index 0000000..f37858b
--- /dev/null
+++ b/index.php.tls
@@ -0,0 +1,55 @@
+Cannot connect to LDAP server";
+ } else {
+ ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
+ ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
+
+ $bind_dn = "uid=$uid,ou=People,dc=$host";
+ if (@ldap_bind($ldap, $bind_dn, $password)) {
+ $msg = "Login successful! Welcome $uid 🎉
";
+ } else {
+ $msg = "Invalid credentials
";
+ }
+ ldap_close($ldap);
+ }
+ } else {
+ $msg = "uid=$uid,ou=People,dc=$host Please fill both fields
";
+ }
+}
+?>
+
+
+
+
+ ldapdock – LDAP login
+
+
+
+ ldapdock login
+ Server: = htmlspecialchars($host) ?>
+ = $msg ?>
+
+
+ Test user: marisa / q*****
+
+