DumbDrop icon indicating copy to clipboard operation
DumbDrop copied to clipboard

Error checking PIN requirement | error setting up pin

Open sainiaj opened this issue 1 year ago • 17 comments

I keep getting this error, I have setup pin in the docker-compose

Error checking PIN requirement

Image

sainiaj avatar Feb 19 '25 08:02 sainiaj

I am using unraid docker compose manager

services: dumbdrop: image: dumbwareio/dumbdrop:latest ports: - 8647:3000 volumes: # Where your uploaded files will land - /mnt/cache/appdata/dumbdrop/local_uploads:/app/uploads environment: # The title shown in the web interface DUMBDROP_TITLE: PhotoFrame # Maximum file size in MB MAX_FILE_SIZE: 1024 # Optional PIN protection (leave empty to disable) DUMBDROP_PIN: 1234567890 # Upload without clicking button AUTO_UPLOAD: true # The base URL for the application # BASE_URL: http://localhost:3000 ALLOWED_EXTENSIONS: .jpg,.jpeg,.png

sainiaj avatar Feb 19 '25 08:02 sainiaj

How long is your pin?

abiteman avatar Feb 19 '25 09:02 abiteman

Same issue here after updating from the unraid store. When I remove the pin it works, re-enabling the pin gives the error again. I had a 4 digit pin, changed it to 8 digit but still the same error

wroes avatar Feb 19 '25 11:02 wroes

How long is your pin?

I have tried 8 digit long 4 digit long 9 digit long but still no luck

sainiaj avatar Feb 19 '25 13:02 sainiaj

@wroes @sainiaj Apologies for the trouble, fix is pushed and new build is being deployed now. I missed 2 lines in login.html when updating all the api linking with the new file structure.

Definitely re-open if you're still experiencing issues

greirson avatar Feb 19 '25 16:02 greirson

flawless victory !!!!

Thank you working great !!!

sainiaj avatar Feb 19 '25 17:02 sainiaj

Strange... mine does show the pin screen now but does not accept the entered pin. @sainiaj can you confirm that you get the pin screen and can enter a valid pin?

wroes avatar Feb 20 '25 10:02 wroes

Yes, it is mostly working. I tested the transfer of around 4,000 files, but I encountered a similar issue when I tried to open another instance. I entered the correct PIN, but it wasn’t accepted. This issue only occurred during the test I mentioned.

For the most part, there have been no issues with everyday use so far.

sainiaj avatar Feb 20 '25 13:02 sainiaj

@greirson seems there is still an issue with the pin, it is not accepted in a new session. I'm not allowed to reopen the issue. Can you have a look at it? maybe more then 2 lines were missing ;)

wroes avatar Feb 20 '25 15:02 wroes

@sainiaj @wroes what browsers are you using?

And could you send me the console logs from your browser? I'm not able to replicate the issue.

greirson avatar Feb 20 '25 17:02 greirson

hey there 👋🏻 new dumbware user here and liking what i see so far! i just deployed dumbdrop with compose and with a pin and getting somewhat of a similiar error.

it looks like im stuck in an infinite redirect. when i inspect the cookies it looks like the DUMBDROP_PIN is missing from the cookies, while the rest (do, budget, kan, etc) are all intact.

  • Image

looking at the repo in app.js i see one route that might be the culprit for me

  • Image
  • not sure if this is the direct issue, but it seems like it's never able to set the DUMBDROP_PIN as a cookie so it's constantly redirecting

still investigating but this is what i found so far 🤔


updates:

  • i'm able to access DumbDrop after manually adding the DUMBDROP_PIN as a cookie with the correct pin as the value in devtools
  • another find: the pin verification works fine when exposing it via reverse proxy, but does not work when accessing via localIP:port

replication:

  1. run the container on one machine and on a different client try to access that instance via localIPofDifferentMachine:port (only on the production docker compose)
  2. if running the production compose, remove the BASE_URL env var from the compose and try access from the local ip on the same machine

gitmotion avatar Feb 20 '25 19:02 gitmotion

@greirson added fix to PR: https://github.com/DumbWareio/DumbDrop/pull/32

  • see replication and testing details in PR

gitmotion avatar Feb 21 '25 02:02 gitmotion

@gitmotion appreciate you jumping in! I pushed 1a74774 with some other changes that I had stewing for to add cache-control headers to prevent login page caching and improving rate limit handling. Your PR totally builds on that with the logic and cookie handling. Could you take a look at the conflicts when you have a sec and we can merge in.

P.s. we're in the middle of moving the dockerhub account to an org account so image updates are delayed. We'll message when the image updates are rolling again.

greirson avatar Feb 21 '25 20:02 greirson

@greirson my pleasure - oh nice just saw the commit details and looks like you already had a fix in mind for the redirect loop 👍🏻 resolved the conflicts and kept your changes for the redirect fix on login.html (tested with docker build and works). let me know if you needed any other any other fixes for that pr

gitmotion avatar Feb 21 '25 20:02 gitmotion

this issue should be fixed with the new changes from https://github.com/DumbWareio/DumbDrop/commit/1a74774d6a4eea8bba4780a0fcd33f289dba51e1 and https://github.com/DumbWareio/DumbDrop/pull/32!


pulled and tested latest docker image and works just fine with local ip @wroes @sainiaj you can try it by pulling the latest image

gitmotion avatar Feb 24 '25 19:02 gitmotion

Ping back if its still broken for anyone!

greirson avatar Feb 24 '25 23:02 greirson

Hey there! just added a new fix here https://github.com/DumbWareio/DumbDrop/pull/64, which should address these type of issues

pull the latest image / changes, deploy, you may need to clear cache and refresh and it should work for localhost, internal ips, and external domains

see notes below for restricting origins as needed:

  • new ALLOWED_ORIGINS env var
    • Comma-separated list of allowed origins for CORS
    • (default: '*' if empty, replace with your base_url if you want to restrict only to base_url)
    • When adding multiple origins, base_url will be included by default and does not need to the list
    • ALLOWED_IFRAME_ORIGINS: #DEPRECATED and will be used as ALLOWED_ORIGINS if SET
    • ALLOWED_ORIGINS: http://internalip:port,https://subdomain.example.com

hope that helps!

gitmotion avatar Jun 20 '25 22:06 gitmotion