Git Product home page Git Product logo

fmajor's Introduction

Login: kissen                         Name: Andreas Schärtl
Directory: https://www.schaertl.me/   Shell: /usr/bin/zsh
On since Fri May 01 (CEST)
Plan:
     _ _  __  __ _            _ _  ___
  __| (_)/ _|/ _(_) ___ _   _| | ||__ \
 / _` | | |_| |_| |/ __| | | | | __|/ /
| (_| | |  _|  _| | (__| |_| | | |_|_|
 \__,_|_|_| |_| |_|\___|\__,_|_|\__(_)

     _               _  __ _            _ _
 ___| |__  _ __ ___ (_)/ _(_) ___ _   _| | |_
/ __| '_ \| '_ ` _ \| | |_| |/ __| | | | | __|
\__ \ | | | | | | | | |  _| | (__| |_| | | |_ _
|___/_| |_|_| |_| |_|_|_| |_|\___|\__,_|_|\__(_)

fmajor's People

Contributors

kissen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

fmajor's Issues

Limit Uploads to Trusted Users

Currently, anyone with access to an instance of fmajor can upload and delete files. It would be nice if only certain authorized users could upload and delete files.

  • Introduce some kind of passphrase required for uploading and deleting.
  • fmajor is for small-scale installations. It's okay if there is only one password. It's also okay to just store the password hash in the fmajor.conf.
  • Remember authentication status in a cookie so admins don't have to type in their credentials all the time.
  • Anyone with access to the instance could still download and see all files. However they could not upload files.

Such a feature would remove the need for basic authentication on all installations and enable users to share files with other untrusted users.

User authentication

Would it be possible for this to support a user/pass auth system for logging in with isolated files for each user account?

I've been trying to find a file/image/video/upload/host/manager in Go but I have not been able to find one that allows for permanent uploads with multiple users. Most are temporary file uploaders, multiple user upload but no way to view a list of uploads, or a single user with a manage page.

Would this be possible to consider? Everybody is making pomf clones but nobody is making Puush clones.

Proper handling of Content-Type

Currently, the way we infer the content type of uploads is pretty curde, it's done by file extension. Instead we should do the following.

  • During upload actually look at file headers to decide on a content type.
  • Set the download property on the file download links except maybe for images, videos and PDFs. In particular, we shouldn't serve HTML document as-is; displayed in the browser they could steal cookies.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.