Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: replace . & .. & $PWD with ~

Andras Bacsai3e81d7e9cb00
diff --git a/apps/api/src/lib/buildPacks/compose.ts b/apps/api/src/lib/buildPacks/compose.ts
index 2d16c1f8d6..70a2ba8af3 100644
--- a/apps/api/src/lib/buildPacks/compose.ts
+++ b/apps/api/src/lib/buildPacks/compose.ts
@@ -82,9 +82,10 @@ export default async function (data) {
v.startsWith('.') ||
v.startsWith('..') ||
v.startsWith('/') ||
- v.startsWith('~')
+ v.startsWith('~') ||
+ v.startsWith('$PWD')
) {
- // Nothing to do here, host path
+ v = v.replace('$.', `~`).replace('$..', '~').replace('$$PWD', '~');
} else {
if (!path) {
path = v;
diff --git a/apps/ui/src/routes/applications/[id]/storages.svelte b/apps/ui/src/routes/applications/[id]/storages.svelte
index 7f16645a24..8a810b635d 100644
--- a/apps/ui/src/routes/applications/[id]/storages.svelte
+++ b/apps/ui/src/routes/applications/[id]/storages.svelte
@@ -40,9 +40,10 @@
volume.startsWith('.') ||
volume.startsWith('..') ||
volume.startsWith('/') ||
- volume.startsWith('~')
+ volume.startsWith('~') ||
+ volume.startsWith('$PWD')
) {
- // Nothing to do here, host path
+ volume = volume.replace('$.', `~`).replace('$..', '~').replace('$$PWD', '~');
} else {
if (!target) {
target = volume;