mirror of
https://github.com/PrivateCaptcha/PrivateCaptcha.git
synced 2026-02-08 14:59:25 -06:00
Fix template sitekey reference and remove duplicate enabled check
Co-authored-by: ribtoks <505555+ribtoks@users.noreply.github.com>
This commit is contained in:
@@ -147,7 +147,7 @@ func (v *Verifier) verifyPuzzleValid(ctx context.Context, payload puzzle.Solutio
|
||||
|
||||
if (property != nil) && !property.Enabled {
|
||||
slog.WarnContext(ctx, "Property is disabled", "propID", property.ID, common.PuzzleIDAttr(p.PuzzleID()))
|
||||
return p, property, puzzle.VerifyErrorOther
|
||||
return p, nil, puzzle.VerifyErrorOther
|
||||
}
|
||||
|
||||
var maxCount uint32 = 1
|
||||
@@ -212,11 +212,6 @@ func (v *Verifier) Verify(ctx context.Context, verifyPayload puzzle.SolutionPayl
|
||||
result.OrgID = property.OrgID.Int32
|
||||
result.PropertyID = property.ID
|
||||
result.Domain = property.Domain
|
||||
|
||||
if !property.Enabled {
|
||||
slog.WarnContext(ctx, "Property is disabled in Verify", "propID", property.ID)
|
||||
return nil, db.ErrDisabled
|
||||
}
|
||||
}
|
||||
if perr != puzzle.VerifyNoError && perr != puzzle.MaintenanceModeError {
|
||||
return result, nil
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-2.5 h-2.5 fill-gray-300" viewBox="0 0 20 20" fill="currentColor">
|
||||
<path fill-rule="evenodd" d="M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
{{ printf "%.6s" .Sitekey }}
|
||||
{{ printf "%.6s" $property.Sitekey }}
|
||||
</span></p>
|
||||
<p class="truncate text-sm text-gray-400">{{if $property.AllowSubdomains}}*.{{end}}{{ $property.Domain }}</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user