Skip to content

Commit

Permalink
fix potential security issue in mass loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jun 13, 2011
1 parent b1b38bb commit 8145eb1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion plugins/users/app/models/user.rb
Expand Up @@ -145,11 +145,14 @@ def load_data(data)
load_attributes(attrs)
end

#XXX USE base model which already contain such functionality it automatic
ATTR_ACCESSIBLE = [:cn, :uid, :uid_number, :gid_number, :grouplist, :groupname,
:home_directory, :login_shell, :user_password, :type ]
# load a hash of attributes
def load_attributes(attrs)
return false if attrs.nil?
attrs.each do |key, value|
if self.respond_to?(key.to_sym)
if ATTR_ACCESSIBLE.include?(key.to_sym)
self.send("#{key}=".to_sym, value)
end
end
Expand Down
6 changes: 6 additions & 0 deletions plugins/users/package/webyast-users-ws.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jun 13 14:15:38 UTC 2011 - jreidinger@novell.com

- fix potential security issue in mass loading
- 0.2.9

-------------------------------------------------------------------
Tue May 24 10:09:20 UTC 2011 - vgorobets@suse.de

Expand Down
2 changes: 1 addition & 1 deletion plugins/users/package/webyast-users-ws.spec
Expand Up @@ -19,7 +19,7 @@ License: GPL-2.0
Group: Productivity/Networking/Web/Utilities
URL: http://en.opensuse.org/Portal:WebYaST
Autoreqprov: on
Version: 0.2.8
Version: 0.2.9
Release: 0
Summary: WebYaST - users management
Source: www.tar.bz2
Expand Down

0 comments on commit 8145eb1

Please sign in to comment.