File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def _build_query(config: dict) -> dict:
3535 if "scope" in config :
3636 config ["scope" ] = " " .join (config ["scope" ])
3737
38- if config .get ("smtp_required" ):
38+ if config .pop ("smtp_required" , None ):
3939 config ["options" ] = "smtp_required"
4040
4141 return config
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ def test_build_query_with_smtp_required_true(self):
4545 }
4646 result = _build_query (config )
4747 assert result ["options" ] == "smtp_required"
48+ assert "smtp_required" not in result # must not leak into URL params
4849
4950 def test_build_query_smtp_required_false_omits_options (self ):
5051 config = {
@@ -83,6 +84,7 @@ def test_build_query_with_pkce_and_smtp_required(self):
8384 }
8485 result = _build_query_with_pkce (config , "secret-hash-123" )
8586 assert result ["options" ] == "smtp_required"
87+ assert "smtp_required" not in result # must not leak into URL params
8688 assert result ["code_challenge" ] == "secret-hash-123"
8789 assert result ["code_challenge_method" ] == "s256"
8890
You can’t perform that action at this time.
0 commit comments