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
MURDER frontend doesn't relays GETMETADATA command correctly to backend #4439
Comments
Thanks @ksmurchison @rsto: what do you make of this? I'm looking at imap_proxy.c and it looks inconsistent in its handling of [GS]ET(METADATA|ANNOTATION)...
So that's three different shapes of implementation. I feel like they should converge towards a single choice... Looks like we already tried to converge towards just always using [GS]ETMETADATA in 43c9f84, but the crucial line of I think it's sufficient to just apply @yaonos's patch, do you agree? If so, I'll also cherry-pick it back as far as 3.2, cause it looks like that's how far back this issue goes. Or do we want to do something more complicated here, perhaps checking what the backend supports like |
imap_proxy.c: Fix proxying GETMETADATA (Issue #4439)
Description of the issue
While preparing an upgrade from Cyrus-IMAP 2.4.22 to 3.4.5, I discovered an issue with cyradm's info command that does not return any information appart from the backend name when executed on a frontend. There is no issue when this command is executed on a backend.
Diagnosis
While trying to find a solution to this issue, I discovered that the GETMETADATA command that is sent to the frontend is relayed as a GETANNOTATION command to the backends with the GETMETADATA parameters kept as they were received instead of beeing converted to GETANNOTATION compatible parameters.
Here is an example of what is received by the frontend from the cyradm's info command :
And here is what is proxied to the backend by the frontend :
Resolution proposal
I could correct this issue by replacing the GETANNOTATION command sent to the backend in annotate_fetch_proxy() by the GETMETADATA command. I join my patch to this issue in order for you to review this solution. I hope that it does not introduce any new issue.
cyrus-imapd_getmetadata_proxy.patch
The text was updated successfully, but these errors were encountered: