Skip to content

Commit

Permalink
oxdisco: recognize /mail/config-v1.1.xml URI
Browse files Browse the repository at this point in the history
References: GXF-1889
  • Loading branch information
jengelh committed Feb 18, 2025
1 parent 7badd49 commit d9eb9c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions exch/oxdisco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ BOOL OxdiscoPlugin::preproc(int ctx_id)
return TRUE;
if (strncasecmp(uri, "/.well-known/autoconfig/mail/config-v1.1.xml", 44) == 0 && brkp(uri[44]))
return TRUE;
if (strncasecmp(uri, "/mail/config-v1.1.xml", 21) == 0 && brkp(uri[21]))
return TRUE;
if (strncasecmp(uri, "/autodiscover/autodiscover.json", 31) == 0 && brkp(uri[31]))
return TRUE;
return false;
Expand Down Expand Up @@ -302,6 +304,11 @@ http_status OxdiscoPlugin::proc(int ctx_id, const void *content, uint64_t len) t
return resp_autocfg(ctx_id, auth_info.username);
auto username = extract_qparam(&uri[45], "emailaddress");
return resp_autocfg(ctx_id, username.c_str());
} else if (strncasecmp(uri, "/mail/config-v1.1.xml", 21) == 0 && brkp(uri[21])) {
if (uri[21] == '/' || uri[21] == '\0')
return resp_autocfg(ctx_id, auth_info.username);
auto username = extract_qparam(&uri[22], "emailaddress");
return resp_autocfg(ctx_id, username.c_str());
} else if (strncasecmp(uri, "/autodiscover/autodiscover.json", 31) == 0 && brkp(uri[31])) {
return resp_json(ctx_id, uri);
}
Expand Down

0 comments on commit d9eb9c8

Please sign in to comment.