[GH-ISSUE #149] Restricting uploading (password protection?) #120

Closed
opened 2026-02-25 23:40:45 +03:00 by kerem · 2 comments
Owner

Originally created by @peczony on GitHub (Jun 28, 2023).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/149

Hi, thank you for the great work on the project!

I skimmed through the docs and couldn't understand how I could protect my instance from abuse. If it's open to the internet, anyone could host their content, including undesirable content (e.g. porn).

Is there any mechanism I could use to prevent this? I couldn't find any mention of passwords or tokens in the docs which could be used to prevent outside uploads. Ideally I would want to keep the instance only for myself & friends that I trust.

Originally created by @peczony on GitHub (Jun 28, 2023). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/149 Hi, thank you for the great work on the project! I skimmed through the docs and couldn't understand how I could protect my instance from abuse. If it's open to the internet, anyone could host their content, including undesirable content (e.g. porn). Is there any mechanism I could use to prevent this? I couldn't find any mention of passwords or tokens in the docs which could be used to prevent outside uploads. Ideally I would want to keep the instance only for myself & friends that I trust.
kerem closed this issue 2026-02-25 23:40:45 +03:00
Author
Owner

@geek-at commented on GitHub (Jun 29, 2023):

Hey!

At the moment there is only the "ALLOWED_SUBNET" config variable which limits uploads from an IP or IP space you define.

There is also a variable called "UPLOAD_CODE" that's not yet implemented but will act as a token that has to be specified in order to upload

<!-- gh-comment-id:1612549207 --> @geek-at commented on GitHub (Jun 29, 2023): Hey! At the moment there is only the ["ALLOWED_SUBNET" config variable](https://github.com/HaschekSolutions/pictshare/blob/master/rtfm/CONFIG.md) which limits uploads from an IP or IP space you define. There is also a variable called "UPLOAD_CODE" that's not yet implemented but will act as a token that has to be specified in order to upload
Author
Owner

@alexdatur commented on GitHub (Oct 31, 2024):

i do it through nginx

pass secured

location = / {
   auth_basic "Restricted Access";
   auth_basic_user_file /etc/nginx/.htpasswd;
   proxy_pass http://localhost:95;
   *
}

# to gallery without password
location / {
    proxy_pass http://localhost:95;
    *
<!-- gh-comment-id:2450230913 --> @alexdatur commented on GitHub (Oct 31, 2024): i do it through nginx # pass secured location = / { auth_basic "Restricted Access"; auth_basic_user_file /etc/nginx/.htpasswd; proxy_pass http://localhost:95; * } # to gallery without password location / { proxy_pass http://localhost:95; *
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#120
No description provided.