security: remove development bypass tokens from production code
This commit is contained in:
parent
83317e8e0f
commit
95be179a38
|
|
@ -23,10 +23,6 @@ func NewAltchaService(secretKey string) *AltchaService {
|
|||
|
||||
// VerifyToken validates an ALTCHA token using the official library
|
||||
func (s *AltchaService) VerifyToken(token, remoteIP string) (*AltchaResponse, error) {
|
||||
// Allow bypass token for development
|
||||
if token == "BYPASS_DEV_MODE" {
|
||||
return &AltchaResponse{Verified: true}, nil
|
||||
}
|
||||
|
||||
if s.secretKey == "" {
|
||||
// If no secret key is configured, skip verification (for development)
|
||||
|
|
|
|||
|
|
@ -35,10 +35,6 @@ func NewTurnstileService(secretKey string) *TurnstileService {
|
|||
|
||||
// VerifyToken validates a Turnstile token with Cloudflare
|
||||
func (s *TurnstileService) VerifyToken(token, remoteIP string) (*TurnstileResponse, error) {
|
||||
// Allow bypass token for development (Flutter web)
|
||||
if token == "BYPASS_DEV_MODE" {
|
||||
return &TurnstileResponse{Success: true}, nil
|
||||
}
|
||||
|
||||
if s.secretKey == "" {
|
||||
// If no secret key is configured, skip verification (for development)
|
||||
|
|
|
|||
Loading…
Reference in a new issue