From e4373a77135bd4c9ab97febf387bf8e289605fab Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 12 Jun 2013 22:11:53 +0200 Subject: [PATCH] Mailinglists: possible room aliases have to be prepared to not contain blanks and non-ascii-chars. --- webcit/roomlist.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webcit/roomlist.c b/webcit/roomlist.c index 2b282ff72..d45db6dc8 100644 --- a/webcit/roomlist.c +++ b/webcit/roomlist.c @@ -427,6 +427,7 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP) HashList *Domains; StrBuf *Line; StrBuf *Token; + StrBuf *RoomName; HashList *PossibleAliases = NULL; const char *pComma; @@ -441,12 +442,15 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP) return NULL; PossibleAliases = NewHash(1, NULL); Line = NewStrBuf(); + RoomName = NewStrBufDup(WCC->CurRoom.name); + StrBufAsciify(RoomName, '_'); + StrBufReplaceChars(RoomName, ' ', '_'); AppendPossibleAliasWithDomain(PossibleAliases, &n, Domains, HKEY("room_"), - SKEY(WCC->CurRoom.name)); + SKEY(RoomName)); serv_puts("GNET "FILE_MAILALIAS); @@ -502,7 +506,7 @@ HashList *GetThisRoomPossibleMAlias(StrBuf *Target, WCTemplputParams *TP) AppendImportantMessage(_("Higher access is required to access this function."), -1); FreeStrBuf(&Line); - + FreeStrBuf(&RoomName); return PossibleAliases; } -- 2.30.2