Index: openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/login.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/login.tcl 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/login.tcl 12 Sep 2016 07:48:13 -0000 1.1.2.1 @@ -9,10 +9,17 @@ set system_name [ad_system_name] # User Portrait -set portrait "" set portrait_id [acs_user::get_portrait_id -user_id $user_id] if {$portrait_id == 0} { - set src http://www.gravatar.com/avatar/md5?size=35&d=mm + set email [party::email -party_id $user_id] + if {[info commands ns_md5] ne ""} { + set md5 [string tolower [ns_md5 $email]] + } else { + package require md5 + set md5 [string tolower [md5::Hex [md5::md5 -- $email]]] + } + set src //www.gravatar.com/avatar/$md5?size=35&d=mm + security::csp::require img-src www.gravatar.com } else { set src [export_vars -base /shared/portrait-bits.tcl {user_id {size x50}}] }