-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rails 7.1 to the test matrix #64
base: main
Are you sure you want to change the base?
Conversation
test "can't be used to inject SQL using .where" do | ||
assert_raises MySQLBinUUID::InvalidUUID do | ||
expected_error = ActiveRecord.version.to_s < "7.1" ? MySQLBinUUID::InvalidUUID : ActiveRecord::StatementInvalid | ||
assert_raises(expected_error) do | ||
MyUuidModel.where(the_uuid: "' OR ''='").first | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Rails 7.1, the MySQLBinUUID::InvalidUUID
error raised by this library gets wrapped in an ActiveRecord::StatementInvalid
.
@@ -8,11 +8,11 @@ concurrency: | |||
|
|||
jobs: | |||
tests: | |||
continue-on-error: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disable the continue-on-error
setting. This caused the workflow to always pass, even if a job failed.
strategy: | ||
fail-fast: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disable fail-fast
. This prevents GitHub Actions from canceling remaining jobs if any job in the matrix fails.
Let's ensure compatibility with the latest version of Rails.