Daniel Castilla

Results 8 comments of Daniel Castilla

I have a related problem. I received an email with an attachment, whose filename is "iso-8859-1''Elk%FCld%F6tt%20felsz%F3l%EDt%E1s%20ELK-F-24011370.pdf" The filename gets decoded as Elk�ld�tt felsz�l�t�s ELK-F-24011370.pdf After url decoding the string it...

Actually it seems that the first part of the code is not equivalent to the RFC 2231 Specification, where a string can be represented like `charset'language'encoded-text`, in my case `iso-8859-1''Elk%FCld%F6tt%20felsz%F3l%EDt%E1s%20ELK-F-24011370.pdf`...

My pull request did not pass the following test: AttachmentLongFilenameTest.php `self::assertEquals("f7b5181985862431bfc443d26e3af2371e20a0afd676eeb9b9595a26d42e0b73", hash("sha256", $attachment->filename));` The assertion in the test assumes that the output filename of `iso-8859-15''%30%31%5F%41%A4%E0%E4%3F%3F%3F%3F%40%5A%2D%30%31%32%33%34%35%36%37%38%39%2D%71%77%65%72%74%79%75%69%6F%70%61%73%64%66%67%68%6A%6B%6C%7A%78%63%76%62%6E%6D%6F%70%71%72%73%74%75%76%7A%2D%30%31%32%33%34%35%36%37%38%39%2D%71%77%65%72%74%79%75%69%6F%70%61%73%64%66%67%68%6A%6B%6C%7A%78%63%76%62%6E%6D%6F%70%71%72%73%74%75%76%7A%2D%30%31%32%33%34%35%36%37%38%39%2D%71%77%65%72%74%79%75%69%6F%70%61%73%64%66%67%68%6A%6B%6C%7A%78%63%76%62%6E%6D%6F%70%71%72%73%74%75%76%7A%2E%74%78%74` is in its original encoding...

I have the same issue, but only from time to time. I pinpointed the infitnite loop to the while loop in the ImapProtocol::nextLine() method as @sergiy-petrov described. I'm provisionally doing...

@laurent-rizer not sure if your solution will work, fread() and feof() should behave the same, I think. changing `while (($next_char = fread($this->stream, 1)) !== false && $next_char !== "\n") {`...

I got the next problem, I got again an endless loop, but this time over 500.000 times a PHP Warning was written to the logs: "fread(): SSL: An existing connection...

> Concerning `fgets` that was the case a few versions before Do you know what the problem was? I have changed my code to use fgets and seems to work...

If the change was really only for debugging purposes, we should revert to fgets(). There is no advantage (as I understand it) in reading character after character for debugging. fgets()...