Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Set media path to write to non-source code directory #9

Closed
TheLonelyGhost opened this issue Jan 17, 2020 · 1 comment
Closed

Set media path to write to non-source code directory #9

TheLonelyGhost opened this issue Jan 17, 2020 · 1 comment
Assignees
Labels
Code Quality Suggestion which improves the quality of the codebase DevOps Impacts to deployment and maintenance from a sysadmin perspective

Comments

@TheLonelyGhost
Copy link
Member

This is generally a security risk, if we allowed users we didn't fully trust to access the wiki. We do, but let's pretend for a second that we didn't.


A user might upload malicious file as one half of an exploit and call the uploaded file using another vulnerability. Proper security settings for allowing user uploads is two-fold:

  1. Keep uploads on a separate host or disk than where things are allowed to execute. Maybe that's something like uploading to a static file server (e.g., Amazon S3 bucket), maybe that's a separate path that is mounted with special "no execute" settings in the fstab file (often /tmp is this way)

  2. Making source code directories read/execute only and owned by a different user than the runtime user (e.g., owned by root, executed as username blossom)


Given we do trust everyone who would have wiki access, that's less of an issue. Where it remains an issue is we have to pull some hacky stuff to keep media uploads and reinstall blossom as a package. If it's installed by running a new docker container, we need to mount part of the directory where blossom source code exists. If it's installed as a wheel file in a virtualenv, the source code directory is somewhere buried in a site-packages/ directory and makes it difficult to manage.

Either way, the best plan is to manage blossom's media which aren't versioned with the source code in a configurable directory that is completely separate from the source code.

@TheLonelyGhost TheLonelyGhost added this to the MVP deployment milestone Jan 17, 2020
@TheLonelyGhost TheLonelyGhost added Code Quality Suggestion which improves the quality of the codebase DevOps Impacts to deployment and maintenance from a sysadmin perspective and removed Required for deployment labels Mar 27, 2021
@TheLonelyGhost
Copy link
Member Author

No longer uploading anything to the filesystem, so no longer relevant.

itsthejoker pushed a commit that referenced this issue May 14, 2021
# This is the 1st commit message:

wooo

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #2:

moving computers

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #3:

v1 complete

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #4:

documentation

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #5:

code cleanup and minor bug fixes

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #6:

progress

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #7:

finish feature

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #8:

cleanup and help text

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #9:

working wiki integration

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #10:

wiki branding

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #11:

documentation

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>
itsthejoker pushed a commit that referenced this issue May 14, 2021
# This is the 1st commit message:

wooo

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #2:

moving computers

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #3:

v1 complete

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #4:

documentation

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #5:

code cleanup and minor bug fixes

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #6:

progress

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #7:

finish feature

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #8:

cleanup and help text

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #9:

working wiki integration

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #10:

wiki branding

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #11:

documentation

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #12:

add migrations, update settings to allow for postgres db, and fix betterexceptions

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #13:

add graphical editor

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>

# This is the commit message #14:

usability fixes and a little fun

Signed-off-by: Joe Kaufeld <joe.kaufeld@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Code Quality Suggestion which improves the quality of the codebase DevOps Impacts to deployment and maintenance from a sysadmin perspective
Projects
None yet
Development

No branches or pull requests

2 participants