diff src/server/blog.py @ 487:e588335b6aa8

browser and server side: force lower case for the profile name at new account creation + fixes CSS for textarea
author souliane <souliane@mailoo.org>
date Thu, 19 Jun 2014 19:28:17 +0200
parents ae86b32b959c
children 3eb3a2c0c011 7af8f4ab3675
line wrap: on
line diff
--- a/src/server/blog.py	Wed Jun 18 14:56:51 2014 +0200
+++ b/src/server/blog.py	Thu Jun 19 19:28:17 2014 +0200
@@ -69,6 +69,7 @@
         """
         if key != 'avatar':
             return
+        entity_jid_s = entity_jid_s.lower()
         log.debug(_("Received a new avatar for entity %s") % entity_jid_s)
         avatar = C.AVATARS_DIR + value
         self.avatars_cache[entity_jid_s] = avatar
@@ -105,7 +106,7 @@
         @param profile (str):
         @return: deferred avatar path, relative to the server's root
         """
-        jid_s = profile + '@' + self.host.bridge.getNewAccountDomain()
+        jid_s = (profile + '@' + self.host.bridge.getNewAccountDomain()).lower()
         if jid_s in self.avatars_cache:
             return defer.succeed(self.avatars_cache[jid_s])
         # FIXME: request_id is no more need when actionResult is removed