Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Prevent slashes in folder names for storage explorer

Joshen Limf280ca24d8c7
diff --git a/studio/localStores/storageExplorer/StorageExplorerStore.js b/studio/localStores/storageExplorer/StorageExplorerStore.js
index 794320062f7..e7be4f8c0c5 100644
--- a/studio/localStores/storageExplorer/StorageExplorerStore.js
+++ b/studio/localStores/storageExplorer/StorageExplorerStore.js
@@ -275,9 +275,13 @@ class StorageExplorerStore {
addNewFolder = async (folderName, columnIndex) => {
const autofix = false
const formattedName = this.sanitizeNameForDuplicateInColumn(folderName, autofix, columnIndex)
+
if (isNull(formattedName)) {
return
}
+ if (formattedName.includes('/') || formattedName.includes('\\')) {
+ return toast.error('Folder names should not have forward or back slashes.')
+ }
if (formattedName.length === 0) {
return this.removeTempRows(columnIndex)
}