Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🚀 feat: Add support for LDAP STARTTLS in LDAP Auth (#6438)
Ruben Talstrab70d9f1a8292
diff --git a/.env.example b/.env.exampleindex 54f9c4a96c..70793a7236 100644--- a/.env.example+++ b/.env.example@@ -444,6 +444,7 @@ LDAP_USER_SEARCH_BASE=LDAP_SEARCH_FILTER=mail={{username}}LDAP_CA_CERT_PATH=# LDAP_TLS_REJECT_UNAUTHORIZED=+# LDAP_STARTTLS=# LDAP_LOGIN_USES_USERNAME=true# LDAP_ID=# LDAP_USERNAME=diff --git a/api/strategies/ldapStrategy.js b/api/strategies/ldapStrategy.jsindex 4a2c1b827b..5ec279b982 100644--- a/api/strategies/ldapStrategy.js+++ b/api/strategies/ldapStrategy.js@@ -18,6 +18,7 @@ const {LDAP_USERNAME,LDAP_EMAIL,LDAP_TLS_REJECT_UNAUTHORIZED,+ LDAP_STARTTLS,} = process.env;// Check required environment variables@@ -50,6 +51,7 @@ if (LDAP_EMAIL) {searchAttributes.push(LDAP_EMAIL);}const rejectUnauthorized = isEnabled(LDAP_TLS_REJECT_UNAUTHORIZED);+const startTLS = isEnabled(LDAP_STARTTLS);const ldapOptions = {server: {@@ -72,6 +74,7 @@ const ldapOptions = {})(),},}),+ ...(startTLS && { starttls: true }),},usernameField: 'email',passwordField: 'password',