mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-30 00:53:32 +02:00
- secMiddleware: allow dbPassword to bypass strict char check (stronger passwords) - mysqlUtilities.createDatabase: return (0, error_message) on failure so UI shows real error instead of '0' - mysqlUtilities.createDatabase: backtick-quote db name (fix 'near -admin' with hyphens), escape password and user for SQL - submitDBCreation: pass through error message from createDatabase - backupUtilities, Backupsv2, restoreMeta: treat createDatabase != 1 as failure (tuple return) - patches/allow-dbpassword-special-chars.patch for secMiddleware deploy
12 lines
1.0 KiB
Diff
12 lines
1.0 KiB
Diff
--- a/CyberCP/secMiddleware.py
|
|
+++ b/CyberCP/secMiddleware.py
|
|
@@ -214,7 +214,8 @@ class secMiddleware:
|
|
return HttpResponse(final_json)
|
|
continue
|
|
- if key == 'MainDashboardCSS' or key == 'ownerPassword' or key == 'scriptUrl' or key == 'CLAMAV_VIRUS' or key == "Rspamdserver" or key == 'smtpd_milters' \
|
|
+ # Allow dbPassword to contain special characters for stronger database passwords (create DB / change password)
|
|
+ if key == 'MainDashboardCSS' or key == 'ownerPassword' or key == 'dbPassword' or key == 'scriptUrl' or key == 'CLAMAV_VIRUS' or key == "Rspamdserver" or key == 'smtpd_milters' \
|
|
or key == 'non_smtpd_milters' or key == 'key' or key == 'cert' or key == 'recordContentAAAA' or key == 'backupDestinations'\
|
|
or key == 'ports' \
|
|
or key == 'imageByPass' or key == 'passwordByPass' or key == 'PasswordByPass' or key == 'cronCommand' \
|