Summary: | ASTERISK-10582: get_header_by_tagI() does not remove trailing <CR> | ||
Reporter: | Yehavi Bourvine (yehavi) | Labels: | |
Date Opened: | 2007-10-21 06:54:11 | Date Closed: | 2007-10-22 09:38:02 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_voicemail |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | get_header_by_tag() is used when IMAP support is enabled. When being used with Dovecot IMAP server the lines read from the server are terminated with \r\n. The above routing removes the \n but does not check whether there is also \r. This causes the \r to be appeded to the parameter read from the server. ****** ADDITIONAL INFORMATION ****** In the meantime I've modified this function and added the following line before the last return call in the function: if(eol_pnt[-1] == '\r') eol_pnt[-1] = '\0'; By the way, there is no test whether \n was found or not before setting it to '\0'; although it should be there always, a check for this should be added (IMHO). Thanks! __Yehavi: | ||
Comments: | By: Mark Michelson (mmichelson) 2007-10-22 09:25:12 Thanks for the bug report! All efforts to improve IMAP support are greatly appreciated! By: Digium Subversion (svnbot) 2007-10-22 09:28:27 Repository: asterisk Revision: 86694 U branches/1.4/apps/app_voicemail.c ------------------------------------------------------------------------ r86694 | mmichelson | 2007-10-22 09:28:26 -0500 (Mon, 22 Oct 2007) | 5 lines Account for the fact that sometimes headers may be terminated with instead of just (closes issue ASTERISK-10582, reported by yehavi) ------------------------------------------------------------------------ By: Digium Subversion (svnbot) 2007-10-22 09:38:02 Repository: asterisk Revision: 86696 _U trunk/ U trunk/apps/app_voicemail.c ------------------------------------------------------------------------ r86696 | mmichelson | 2007-10-22 09:38:01 -0500 (Mon, 22 Oct 2007) | 13 lines Merged revisions 86694 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86694 | mmichelson | 2007-10-22 09:48:46 -0500 (Mon, 22 Oct 2007) | 5 lines Account for the fact that sometimes headers may be terminated with instead of just (closes issue ASTERISK-10582, reported by yehavi) ........ ------------------------------------------------------------------------ |