Skip to content

Commit

Permalink
Merge pull request #182 from croessner/features
Browse files Browse the repository at this point in the history
Fix: Add early return in feature error handling
  • Loading branch information
croessner authored Dec 3, 2024
2 parents 794cc82 + 2ad52d8 commit bedd513
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/core/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ func (a *AuthState) checkLuaFeature(ctx *gin.Context) (triggered bool, abortFeat
triggered, abortFeatures, err = a.FeatureLua(ctx)
if err != nil {
a.FeatureName = ""

return
}

if triggered {
Expand Down Expand Up @@ -501,6 +503,8 @@ func (a *AuthState) checkRBLFeature(ctx *gin.Context) (triggered bool, err error
triggered, err = a.FeatureRBLs(ctx)
if err != nil || !triggered {
a.FeatureName = ""

return
}

a.processFeatureAction(definitions.FeatureRBL, definitions.LuaActionRBL, definitions.LuaActionRBLName)
Expand Down

0 comments on commit bedd513

Please sign in to comment.