Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Allow password length over 71 chars

Đang mở
#798 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
authentication, security

Hướng nghiên cứu

Bắt đầu với auth/password/password.go, sau đó lần theo cách nó được sử dụng từ database/database.go và app.go cho GOTIFY_DEFAULTUSER_PASS và GOTIFY_DATABASE_CONNECTION. So sánh các cách tiếp cận băm mật khẩu hiện có và xác định cách xử lý các mật khẩu hiện tại; công việc được hoàn tất khi có thể sử dụng mật khẩu dài hơn 71 ký tự mà không gặp panic khi khởi động đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Go
Star
16k
Fork
891
Merge trung bình
2 ngày 11 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của gotify/server

Tất cả issue của gotify/server

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.