Actions
Bug #12325
closedAvatars are broken after restoring Foreman DB on a new host
Description
After restoring the Foreman DB on a new host, the avatars are broken. The file with the hash is created on disk in /usr/share/foreman/public/assets/avatars, but it is empty.
stbenjam on IRC recommended to run this on the Foreman host:
echo "User.all.each { |user| user.update_attributes(:avatar_hash => nil) }" | foreman-rake console
After logging in again, I get this in the logfile:
2015-10-27 14:23:44 [sql] [I] Successfully decrypted field for AuthSourceLdap Active Directory 2015-10-27 14:23:45 [app] [W] Action failed | Encoding::UndefinedConversionError: "\xFF" from ASCII-8BIT to UTF-8 | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:176:in `write' | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:176:in `block in store_avatar' | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:176:in `open' | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:176:in `store_avatar' | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:162:in `block in attributes_values' | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:159:in `each' | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:159:in `map' | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:159:in `attributes_values' | /usr/share/foreman/app/models/auth_sources/auth_source_ldap.rb:53:in `authenticate' | /usr/share/foreman/app/models/user.rb:187:in `try_to_login' | /usr/share/foreman/app/controllers/users_controller.rb:71:in `login'
Updated by The Foreman Bot about 9 years ago
- Status changed from New to Ready For Testing
- Assignee set to Shlomi Zadok
- Pull request https://github.com/theforeman/foreman/pull/2888 added
Updated by Dominic Cleal about 9 years ago
- Translation missing: en.field_release set to 104
Updated by Shlomi Zadok about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset b57821379e4af56e81780051ab7737318b1db116.
Updated by Dominic Cleal almost 9 years ago
- Related to Bug #12730: remove fakefs gem added
Actions