karasz 2d3caf2e82 fix: eliminate request handler race condition and add input validation
- Remove global d variable; declare passwordData locally per request,
eliminating a data race under concurrent requests and the bug where
NoUpper/DenyRepeat were never reset between requests
- Add parseParam helper that strictly validates integer fields: absent
fields fall back to the configured default, while invalid or
out-of-range values return HTTP 400 with a descriptive message
- Cap password length at 512 characters to prevent CPU/memory exhaustion
- Bump go.mod from 1.14 to 1.25 (minimum maintained release; required
for errors.Join used in validation)

Signed-off-by: Nagy Károly Gábriel <k@jpi.io>
2026-04-30 13:31:51 +03:00
2020-12-22 16:24:49 +02:00
2020-12-22 16:24:49 +02:00
2020-12-22 16:24:49 +02:00
2020-12-22 16:24:49 +02:00
2020-12-22 16:24:49 +02:00
2020-12-22 16:24:49 +02:00
2020-12-22 16:24:49 +02:00

gonew

This is the go mod version of gonew. If you want the previous version that is using some hackery around GOPATH please use the GOPATH branch https://github.com/karasz/gonew/tree/GOPATH

S
Description
Quick and dirty golang thingy that generates passwords on HTTP 8080
Readme 165 KiB
Languages
Go 85.7%
Makefile 12.4%
Dockerfile 1.9%