Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Allow password length over 71 chars

Aperta
#798 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go

Direzione di ricerca

Inizia con auth/password/password.go, quindi segui il suo utilizzo da database/database.go e app.go per GOTIFY_DEFAULTUSER_PASS e GOTIFY_DATABASE_CONNECTION. Confronta gli approcci disponibili all'hashing delle password e definisci come vengono gestite le password esistenti; il lavoro sarà completo quando saranno consentite password più lunghe di 71 caratteri senza il panic all'avvio segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

a:feature in:server

Is your feature request related to a problem? Please describe.
When setting environment variable GOTIFY_DEFAULTUSER_PASS or the password in GOTIFY_DATABASE_CONNECTION to a string longer than 71 chars, I get the following error in my journalctl:

<DATE> <HOSTNAME> systemd[1]: Started podman-gotify.service.
<DATE> <HOSTNAME> <...>[8313]: <...>
<DATE> <HOSTNAME> <...>[8329]: Starting Gotify version 2.6.3@2025-04-27-09:10:38
<DATE> <HOSTNAME> <...>[8329]: panic: bcrypt: password length exceeds 72 bytes
<DATE> <HOSTNAME> <...>[8329]:
<DATE> <HOSTNAME> <...>[8329]: goroutine 1 [running]:
<DATE> <HOSTNAME> <...>[8329]: github.com/gotify/server/v2/auth/password.CreatePassword(...)
<DATE> <HOSTNAME> <...>[8329]:         /src/gotify/auth/password/password.go:9
<DATE> <HOSTNAME> <...>[8329]: github.com/gotify/server/v2/database.New(<...>)
<DATE> <HOSTNAME> <...>[8329]:         /src/gotify/database/database.go:58 +0x469
<DATE> <HOSTNAME> <...>[8329]: main.main()
<DATE> <HOSTNAME> <...>[8329]:         /src/gotify/app.go:42 +0x236
<DATE> <HOSTNAME> <...>[8339]: 2025-05-18 13:23:14.006036461 +0000 UTC m=+0.048855570 container died <...> (image=docker.io/gotify/server:2, name=<...>, PODMAN_SYSTEMD_UNIT=p>
<DATE> <HOSTNAME> <...>[8339]: 2025-05-18 13:23:14.218830403 +0000 UTC m=+0.261649572 container remove <...> (image=docker.io/gotify/server:2, name=<...>, pod_id=<...>>
<DATE> <HOSTNAME> systemd[1]: podman-gotify.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
<DATE> <HOSTNAME> systemd[1]: podman-gotify.service: Failed with result 'exit-code'.
<DATE> <HOSTNAME> systemd[1]: podman-gotify.service: Consumed 610ms CPU time, 19.5M memory peak, 13.3M written to disk.
<DATE> <HOSTNAME> systemd[1]: podman-gotify.service: Scheduled restart job, restart counter is at 5.

This is a thread that describes the problem in detail.

Describe the solution you'd like
I'm not familiar with go and haven't used any of these libraries, but after some research it was often suggested to use argon2id package.

Describe alternatives you've considered

  • Implement an environemnt variable/config option to let the user choose the algorithm.
  • Add note to config that passwords are limited to 71 UTF-8 chars
Lingua principale
Go
Stelle
16k
Fork
878
Merge medio
2g 10h
PR unite (30g)
4

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di gotify/server

Tutte le issue di gotify/server

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.