exposedev / exposedev/expose

[Bug]: Docker entrypoint sed replacement breaks with special characters in password

Open
#463 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
4.6k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

### System architecture

Linux

### PHP Version

_No response_

### Bug description

The docker entrypoint script docker-entrypoint.sh uses sed to replace username/password placeholders:

```bash
sed -i "s|username|${username}|g" ${exposeConfigPath}
sed -i "s|password|${password}|g" ${exposeConfigPath}
```

This breaks when the password contains sed special characters.

### Steps to reproduce

1. Set password environment variable containing &: password=MyPass&#
2. Start the container
3. Check the config - password becomes MyPasspassword# instead of MyPass&#

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.