Skip to content

Commit 9090ec2

Browse files
authored
Merge pull request rails#50612 from sato11/use-the-article-an-for-sql
Use the article "an" for "SQL"
2 parents 7060d68 + b109e1f commit 9090ec2

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

activerecord/lib/active_record/connection_adapters/abstract/quoting.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def lookup_cast_type(sql_type)
247247

248248
def warn_quote_duration_deprecated
249249
ActiveRecord.deprecator.warn(<<~MSG)
250-
Using ActiveSupport::Duration as an interpolated bind parameter in a SQL
250+
Using ActiveSupport::Duration as an interpolated bind parameter in an SQL
251251
string template is deprecated. To avoid this warning, you should explicitly
252252
convert the duration to a more specific database type. For example, if you
253253
want to use a duration as an integer number of seconds:

activerecord/lib/active_record/sanitization.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module ClassMethods
1717
# sanitize_sql_for_conditions(["name='%s' and group_id='%s'", "foo'bar", 4])
1818
# # => "name='foo''bar' and group_id='4'"
1919
#
20-
# This method will NOT sanitize a SQL string since it won't contain
20+
# This method will NOT sanitize an SQL string since it won't contain
2121
# any conditions in it and will return the string as is.
2222
#
2323
# sanitize_sql_for_conditions("name='foo''bar' and group_id='4'")
@@ -52,7 +52,7 @@ def sanitize_sql_for_conditions(condition)
5252
# Post.sanitize_sql_for_assignment({ name: nil, group_id: 4 })
5353
# # => "`posts`.`name` = NULL, `posts`.`group_id` = 4"
5454
#
55-
# This method will NOT sanitize a SQL string since it won't contain
55+
# This method will NOT sanitize an SQL string since it won't contain
5656
# any conditions in it and will return the string as is.
5757
#
5858
# sanitize_sql_for_assignment("name=NULL and group_id='4'")

guides/source/7_1_release_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ Please refer to the [Changelog][active-record] for detailed changes.
649649

650650
* Deprecate `config.active_record.suppress_multiple_database_warning`.
651651

652-
* Deprecate using `ActiveSupport::Duration` as an interpolated bind parameter in a SQL
652+
* Deprecate using `ActiveSupport::Duration` as an interpolated bind parameter in an SQL
653653
string template.
654654

655655
* Deprecate `all_connection_pools` and make `connection_pool_list` more explicit.

guides/source/configuring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ Controls whether migrations are numbered with serial integers or with timestamps
10501050
10511051
#### `config.active_record.db_warnings_action`
10521052
1053-
Controls the action to be taken when a SQL query produces a warning. The following options are available:
1053+
Controls the action to be taken when an SQL query produces a warning. The following options are available:
10541054
10551055
* `:ignore` - Database warnings will be ignored. This is the default.
10561056

guides/source/security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ Instead of passing a string, you can use positional handlers to sanitize tainted
674674
Model.where("zip_code = ? AND quantity >= ?", entered_zip_code, entered_quantity).first
675675
```
676676

677-
The first parameter is a SQL fragment with question marks. The second and third
677+
The first parameter is an SQL fragment with question marks. The second and third
678678
parameter will replace the question marks with the value of the variables.
679679

680680
You can also use named handlers, the values will be taken from the hash used:
@@ -708,7 +708,7 @@ The most common entry points are message posts, user comments, and guest books,
708708

709709
XSS attacks work like this: An attacker injects some code, the web application saves it and displays it on a page, later presented to a victim. Most XSS examples simply display an alert box, but it is more powerful than that. XSS can steal the cookie, hijack the session, redirect the victim to a fake website, display advertisements for the benefit of the attacker, change elements on the website to get confidential information or install malicious software through security holes in the web browser.
710710

711-
During the second half of 2007, there were 88 vulnerabilities reported in Mozilla browsers, 22 in Safari, 18 in IE, and 12 in Opera. The Symantec Global Internet Security threat report also documented 239 browser plug-in vulnerabilities in the last six months of 2007. [Mpack](https://www.pandasecurity.com/en/mediacenter/malware/mpack-uncovered/) is a very active and up-to-date attack framework which exploits these vulnerabilities. For criminal hackers, it is very attractive to exploit a SQL-Injection vulnerability in a web application framework and insert malicious code in every textual table column. In April 2008 more than 510,000 sites were hacked like this, among them the British government, United Nations, and many more high profile targets.
711+
During the second half of 2007, there were 88 vulnerabilities reported in Mozilla browsers, 22 in Safari, 18 in IE, and 12 in Opera. The Symantec Global Internet Security threat report also documented 239 browser plug-in vulnerabilities in the last six months of 2007. [Mpack](https://www.pandasecurity.com/en/mediacenter/malware/mpack-uncovered/) is a very active and up-to-date attack framework which exploits these vulnerabilities. For criminal hackers, it is very attractive to exploit an SQL-Injection vulnerability in a web application framework and insert malicious code in every textual table column. In April 2008 more than 510,000 sites were hacked like this, among them the British government, United Nations, and many more high profile targets.
712712

713713
#### HTML/JavaScript Injection
714714

0 commit comments

Comments
 (0)