-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Sluggify the database name #89
Conversation
I also added the new function to the RemoveDatabaseUser class. Did a couple of tests using other characters (FORGE_DB_NAME=abc+11@database) to ensure we are safe but we got forge validation error: FAIL ---> The name must only contain letters, numbers, and underscores.
FAIL ---> The user field must only contain letters, numbers, dashes, and underscores. I have added a regex rule to the db_name to ensure we throw err before the site gets created with crash. This allows us to keep the current behavior when db_name not provided. |
I tried to load the validation messages from the resources/lang/en/validation but Harbor loads messages from default vendor path. We may need some time to fix this, but for now I have specified db_name.regex err message while doing validation. |
It's time to merge if we're all good. I'd love to hear what you think! |
This looks good to me @mehrancodes, I'd say merge it. I do look forward to having some automated tests in this project... a task for another day. |
That's great to hear! I appreciate it! It's now merged and released. |
Fixes #88