Skip to content

Commit

Permalink
[webui] Fix Hakiri reported issue: SQL Injection
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Aug 25, 2015
1 parent 2233087 commit afcf669
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def cleanup_before_destroy
end

def subprojects
Project.where("name like '#{name}:%'")
Project.where("name like ?", "#{name}:%")
end

def revoke_requests
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def password_hash_type=(value)
# Generate accessors for the password confirmation property.
attr_accessor :password_confirmation

scope :all_without_nobody, -> { where("login != '#{nobody_login}'") }
scope :all_without_nobody, -> { where("login != ?", nobody_login) }

# Overriding the default accessor to update @new_password on setting this
# property.
Expand Down

0 comments on commit afcf669

Please sign in to comment.