Pārlūkot izejas kodu

sprintf became Replace

https://github.com/gogs/gogs/pull/5171
see upstream  c0b45fa36ff2b61a61a6c0f7e32f83f64cdb1a62
Girish Ramakrishnan 6 gadi atpakaļ
vecāks
revīzija
8806fdd023
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      start.sh

+ 1 - 1
start.sh

@@ -21,7 +21,7 @@ setup_ldap_source() {
     [[ -z "${ldap_status}" ]] && ldap_status="1"
 
     if mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" \
-        -e "REPLACE INTO login_source (id, type, name, is_actived, is_default, cfg, created_unix, updated_unix) VALUES (1,2,'cloudron',${ldap_status},${ldap_status},'{\"Name\":\"cloudron\",\"Host\":\"${LDAP_SERVER}\",\"Port\":${LDAP_PORT},\"UseSSL\":false,\"SkipVerify\":true,\"BindDN\":\"${LDAP_BIND_DN}\",\"BindPassword\":\"${LDAP_BIND_PASSWORD}\",\"UserBase\":\"${LDAP_USERS_BASE_DN}\",\"AttributeUsername\":\"username\",\"AttributeName\":\"displayname\",\"AttributeSurname\":\"\",\"AttributeMail\":\"mail\",\"Filter\":\"(\\\\u007C(mail=%[1]s)(username=%[1]s))\",\"AdminFilter\":\"(memberof=cn=admins,${LDAP_GROUPS_BASE_DN})\"}','${now}','${now}');"; then
+        -e "REPLACE INTO login_source (id, type, name, is_actived, is_default, cfg, created_unix, updated_unix) VALUES (1,2,'cloudron',${ldap_status},${ldap_status},'{\"Name\":\"cloudron\",\"Host\":\"${LDAP_SERVER}\",\"Port\":${LDAP_PORT},\"UseSSL\":false,\"SkipVerify\":true,\"BindDN\":\"${LDAP_BIND_DN}\",\"BindPassword\":\"${LDAP_BIND_PASSWORD}\",\"UserBase\":\"${LDAP_USERS_BASE_DN}\",\"AttributeUsername\":\"username\",\"AttributeName\":\"displayname\",\"AttributeSurname\":\"\",\"AttributeMail\":\"mail\",\"Filter\":\"(\\\\u007C(mail=%s)(username=%s))\",\"AdminFilter\":\"(memberof=cn=admins,${LDAP_GROUPS_BASE_DN})\"}','${now}','${now}');"; then
         echo "=> LDAP Authentication was setup with status ${ldap_status}"
     else
         echo "=> Failed to setup LDAP authentication"