mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
fix: Database connection lost error
This commit is contained in:
4
packages/server/src/utils/sanitizers.ts
Normal file
4
packages/server/src/utils/sanitizers.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export function sanitizeDatabaseName(dbName: string) {
|
||||
// Replace any character that is not alphanumeric or an underscore with an underscore
|
||||
return dbName.replace(/[^a-zA-Z0-9_]/g, '');
|
||||
}
|
||||
Reference in New Issue
Block a user