-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
malformed MIME header #24
Comments
We can't do much about the issue with the Apple Server. Either they'll fix it soon or the service may vanish entirely. We'll never know for sure. |
I mean your latest commit 4c6c909 To me it seems that the daemon is not parsing the certificate correctly. I found an old version of the binary in my backups, starting it, the certificate got parsed in database.json |
Same here. An older version of xapsd stopped working a couple of month ago (for some unrelated reason I think), and I reconfigured everything just today, only to find out that I’m getting the same error message – and a bunch of success mails from Apple. I think this has to do with the header that Apple’s server is generating:
I’m not sure if the line |
There are two malformed lines under 'Connection: keep-alive' that are doubled correctly immediately after: Strict-Transport-Security: max-age=31536000; includeSubdomains |
For now I'd like to wait for Apple to fix these headers. We're not exclusively using this API endpoint so there will be more people running into it. I hope it's only a matter of days until Apple rolls out a fix. |
Using your version from may 2022 works without problems. It gets the certificate. |
Can you check 4d4ce18 which is one commit before the recent dependency update? |
At least for me this version doesn’t work either – same error. |
This seems a go issue.. |
That could be why I didn't run into this when I tried out 4c6c909 originally, and am still not having issues... I'm runing go-1.19 |
Upstream issue to work around the bug: golang/go#21290 |
- fixes CVE-2023-3978 - works around freswa/dovecot-xaps-daemon#24 Changes: https://github.com/freswa/dovecot-xaps-daemon//compare/f6d5733..836a75b Reported by: Ian McDowell <[email protected]> PR: 274639, 273817 MFH: 2023Q4
- fixes CVE-2023-3978 - works around freswa/dovecot-xaps-daemon#24 Changes: https://github.com/freswa/dovecot-xaps-daemon//compare/f6d5733..836a75b Reported by: Ian McDowell <[email protected]> PR: 274639, 273817 MFH: 2023Q4 (cherry picked from commit 3b4e593)
In the meantime, I came up with a workaround. The idea is to use First create the mitmproxy add-on script
First you should run
Now in the source code, edit If all goes well, you should see a request to the Apple server in the |
I have created #36 which adds code to ignore known, malformed HTTP response headers such as the ones returned from Apple. Can you please verify if the change really works as intended? Unfortunately, I can't verify it myself at the moment. |
I just tried that version of http.go, but my servers fail to renew or get a new certificate. The certificate gets created in the portal, but the process crashes. Jun 25 17:45:57 ServerName xapsd[113517]: 2024/06/25 17:45:57 unexpected EOF |
I added output printing to see where the error was occurring. It is this line (119) : There is data in respBody |
I read that it could be due to gzip compression in the response. I tried disabling HTTP/2 and compression but that didn't work. |
Found it! Line buf, err := io.ReadAll(io.LimitReader(conn, 1 << 10)) It's too short, changed to buf, err := io.ReadAll(io.LimitReader(conn, 9223372036854775807)) and it works |
I wonder if anybody has an idea whether issued certificates can be revoked programmatically via API calls. The 'malformed MIME header line' issue that I did not notice on one machine has resulted in 69,876 new certificates having been generated over the course of two months last year, since 28 July up to 20 September, and now I am getting hundreds of thousands of e-mails from Apple regarding their upcoming expiry. I am on day three and it's almost 270,000 by now. The https://identity.apple.com/pushcert/ portal lists zero certs available to be revoked. Apple says they cannot help me at all. Wonder if there's a similar mechanism for revoking via, I don't know, https://identity.apple.com/pushcert/caservice/revoke or something. |
I just built from master and had to apply the change to 9223372036854775807 above to get it to start without hitting 'unexpected EOF' and restarting / continually creating certificates |
What's |
Max int64, see @pelletierr post, probably anything much larger than 1<<10 would work |
1<<32 works, that’s what I am running right now.Robert ***@***.*** 17 oct. 2024 à 07:02, lukefor ***@***.***> a écrit :
Max int64, see @pelletierr post, probably anything much larger than 1<<10 would work
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Just pushed v1.3 |
Thank you! Services updated, renew will be next summer. Glad I could help! |
I noticed after upgrading to the latest version that push isnt working anymore.
I checked the database.json and I could see that last my phone date was 2 days before (when I updated the software)
So I started clean and deleted all old files and build the lastest again..
When starting the service it now instantly fails with:
xapsd[994]: 2023/03/24 10:24:30 Post "https://identity.apple.com/pushcert/caservice/new": net/http: HTTP/1.x transport connection broken: malformed MIME header line: 1;: mode=block
The text was updated successfully, but these errors were encountered: