Update server/lib/src/idm/oauth2.rs

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
This commit is contained in:
Firstyear 2025-02-13 10:49:12 +10:00 committed by GitHub
parent ab6aa203e2
commit 92c56d3aaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -264,7 +264,7 @@ impl AuthorisePermitSuccess {
ResponseMode::Fragment => {
redirect_uri.set_query(None);
// We can't set query pairs on fragments, only query.
// Per [the RFC](https://www.rfc-editor.org/rfc/rfc6749#section-3.1.2), we can't set query pairs on fragment-containing redirects, only query ones.
let mut uri_builder = url::form_urlencoded::Serializer::new(String::new());
uri_builder.append_pair("code", &self.code);
if let Some(state) = self.state.as_ref() {