ngnix-flask-mysql: when reading password secret file, should strip after read

Open Beginner friendly
#329 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
docker-compose, python
Domain
backend, security

Research direction

Open nginx-flask-mysql/backend/hello.py and inspect line 11, where the password secret file is read. Update the read handling as described so a trailing line ending does not become part of the password, then verify the sample still starts and reads the secret correctly.

Written by the indexing model from the issue text.

Description

Suggest adding .strip() after .read() at https://github.com/docker/awesome-compose/blob/e6b1d2755f2f72a363fc346e52dce10cace846c8/nginx-flask-mysql/backend/hello.py#L11

I spent days debugging a secrets file which had an errant LF character at the end.

See also https://stackoverflow.com/a/75488788/799921

Dominant language
HTML
Stars
46.4k
Forks
8.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/awesome-compose

All issues in docker/awesome-compose

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.