/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
pkg/http/security/hash.go
16 строк
389 B
Michael Mayer
Security: Generate hashed scan paths from resource list
25 фев 2026, 05:01
25 фев 2026, 05:01
b2f137f
Код
Авторство
О чём код?
package security import "hash/fnv" // HashPath returns a lightweight, deterministic hash for an HTTP request path. func HashPath(path string) uint64 { h := fnv.New64a() _, _ = h.Write([]byte(path)) return h.Sum64() } // IsScanPath returns true if the request path matches a scanner path hash. func IsScanPath(path string) bool { _, ok := ScanPathHashes[HashPath(path)] return ok }