- handle_share_api now checks X-Share-Password header against bcrypt hash
before returning trip data. Returns 401 with {protected: true} if password
required but not provided/incorrect
- share_password now stored as bcrypt hash, not plaintext
- All plaintext password logging removed from handle_share_verify
- handle_share_verify uses bcrypt.checkpw instead of string equality
- Migration invalidates existing plaintext share passwords (< 50 chars)
- Removed dead hash_password function (used hashlib.sha256)
- Added bcrypt to trips Dockerfile
Closes #3
12 lines
146 B
Docker
12 lines
146 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
RUN pip install --no-cache-dir PyPDF2 bcrypt
|
|
|
|
COPY . .
|
|
|
|
CMD ["python3", "server.py"]
|