Skip to content

Commit f588465

Browse files
Copilotbmhughes
andcommitted
Use nil_or_empty? function for password check in escape_password_for_sql
Co-authored-by: bmhughes <[email protected]>
1 parent 3d40e50 commit f588465

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/sql/role.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def pg_role_encrypted_password(name)
6363
end
6464

6565
def escape_password_for_sql(password)
66-
return password if password.nil? || password.empty?
66+
return password if nil_or_empty?(password)
6767

6868
# SCRAM-SHA-256 passwords contain $ characters that can be interpreted
6969
# by shell or string processing. Escape them to prevent mangling.

0 commit comments

Comments
 (0)