Skip to content

Ignore optional extensions instead of erroring - #17

Merged
chrzaszcz merged 1 commit into
masterfrom
sasl-channel-binding
Jan 27, 2026
Merged

Ignore optional extensions instead of erroring#17
chrzaszcz merged 1 commit into
masterfrom
sasl-channel-binding

Conversation

@kamilwaz

@kamilwaz kamilwaz commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

This PR updates the parser to ignore optional extensions instead of throwing an error.

I introduced a new error code invalid-extensions (aka server-error-value-ext from the RFC) that is returned when an extension is invalid. extensions-not-supported is still reserved for the m extension.

RFC:

Mandatory extensions sent by one peer but not understood by the
other MUST cause authentication failure (the server SHOULD send
the "extensions-not-supported" server-error-value).

Unknown optional extensions MUST be ignored upon receipt.1

Footnotes

  1. https://datatracker.ietf.org/doc/html/rfc5802#section-5.1

@kamilwaz kamilwaz self-assigned this Jan 26, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.26%. Comparing base (10461b4) to head (b21dda7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   92.18%   92.26%   +0.07%     
==========================================
  Files           5        5              
  Lines         320      323       +3     
==========================================
+ Hits          295      298       +3     
  Misses         25       25              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kamilwaz
kamilwaz marked this pull request as ready for review January 26, 2026 08:34

@NelsonVides NelsonVides left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful. I wrote all of this when I was reading like, my first ever RFC, missed that one! Thanks for catching it! 😄

Comment thread src/fast_scram_parse_rules.erl
Comment thread src/fast_scram_parse_rules.erl
Comment thread src/fast_scram_parse_rules.erl
@chrzaszcz
chrzaszcz merged commit 1f458e8 into master Jan 27, 2026
3 checks passed
@chrzaszcz
chrzaszcz deleted the sasl-channel-binding branch January 27, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants