Skip to content

Conversation

@everettbu
Copy link

Test 9

… vulnerability (#94942)

* disable sql expressions

remove duckdb ref

* Run `make update-workspace`

---------

Co-authored-by: Scott Lepper <[email protected]>
Comment on lines +194 to +200
func enableSqlExpressions(h *ExpressionQueryReader) bool {
enabled := !h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions)
if enabled {
return false
}
return false
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enableSqlExpressions function contains a logic error that prevents SQL expressions from ever being enabled. The function always returns false regardless of the feature flag's value:

func enableSqlExpressions(h *ExpressionQueryReader) bool {
    enabled := !h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions)
    if enabled {
        return false
    }
    return false
}

To correctly implement the feature flag check, consider simplifying to:

func enableSqlExpressions(h *ExpressionQueryReader) bool {
    return h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions)
}

This will properly return true when the feature flag is enabled and false otherwise.

Suggested change
func enableSqlExpressions(h *ExpressionQueryReader) bool {
enabled := !h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions)
if enabled {
return false
}
return false
}
func enableSqlExpressions(h *ExpressionQueryReader) bool {
return h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions)
}

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions!

@github-actions github-actions bot added the stale label Aug 28, 2025
@github-actions
Copy link
Contributor

This pull request has been automatically closed because it has not had any further activity in the last 2 weeks. Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants