Skip to content

Commit 71dcd2e

Browse files
authored
Hotfix for brakeman typo (#275)
2 parents a004678 + 395f67f commit 71dcd2e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

config/brakeman.ignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
{
44
"warning_type": "SQL Injection",
55
"warning_code": 0,
6-
"fingerprint": "05636d40d833157e028a2fd9aecd6f263d7f3915f8ed3334a502e18763f1841d",
6+
"fingerprint": "b9be381566d68ef14f46a175c99ec4814565753eb616f259e5ddcdd9aff5f819",
77
"check_name": "SQL",
88
"message": "Possible SQL injection",
99
"file": "lib/autorequire/data_import.rb",
1010
"line": 148,
1111
"link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
12-
"code": "ActiveRecord::Base.connection.execute(\"SELECT setval('topics_id_seq', #{((Topic.maximum(:id) or 0) + 1)}, ?)\", false)",
12+
"code": "ActiveRecord::Base.connection.execute(\"SELECT setval('topics_id_seq', #{((Topic.maximum(:id) or 0) + 1)}, false)\")",
1313
"render_path": null,
1414
"location": {
1515
"type": "method",
@@ -24,5 +24,5 @@
2424
"note": ""
2525
}
2626
],
27-
"brakeman_version": "7.0.2"
27+
"brakeman_version": "7.1.0"
2828
}

lib/autorequire/data_import.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def self.import_topics
145145
def self.reset_topic_id_starting_value
146146
max_id = Topic.maximum(:id) || 0
147147
new_start_value = max_id + 1
148-
ActiveRecord::Base.connection.execute("SELECT setval('topics_id_seq', #{new_start_value}, ?)", false)
148+
ActiveRecord::Base.connection.execute("SELECT setval('topics_id_seq', #{new_start_value}, false)")
149149
puts "Reset topics ID starting value to #{new_start_value}"
150150
end
151151

0 commit comments

Comments
 (0)