mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-21 11:28:47 +00:00
fix(validation): update regex for directory validation in WebSocket utility
- Modified the regex pattern in the `readValidDirectory` function to allow for a wider range of characters, including colons, improving the validation of directory names. - This change enhances input integrity by ensuring valid directory formats are accepted.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dokploy",
|
"name": "dokploy",
|
||||||
"version": "v0.29.3",
|
"version": "v0.29.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export const readValidDirectory = (
|
|||||||
directory: string,
|
directory: string,
|
||||||
serverId?: string | null,
|
serverId?: string | null,
|
||||||
) => {
|
) => {
|
||||||
if (!/^[\w/. -]{1,500}$/.test(directory)) {
|
if (!/^[\w/. :-]{1,500}$/.test(directory)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user