Repository navigation
Conversation
rmccue
requested changes
Oct 8, 2026
| } | ||
|
|
||
| // Use the configured IdP, rather than an issuer supplied by the response. | ||
| $option_name = 'wpsimplesaml_used_assertion_' . hash( 'sha256', $idp['entityId'] . "\0" . $assertion_id ); |
Member
There was a problem hiding this comment.
A NUL character here feels like a potential problem in waiting (I've seen too many hashing null termination bugs), can we use some other sort of separator here?
| $previous_suppression = $wpdb->suppress_errors(); | ||
| try { | ||
| $result = $wpdb->query( $wpdb->prepare( | ||
| "INSERT IGNORE INTO `$table` (option_name, option_value, autoload) VALUES (%s, %s, %s)", |
Member
There was a problem hiding this comment.
Needs a phpcs ignore here - not that phpcs is great in general on this repo, but let's not make it worse
Use unambiguous length-prefixed keys while atomically retaining legacy claims so existing records and overlapping older workers remain protected. Limit the PHPCS exception to trusted table interpolation and add signed-response, MySQL and concurrency regression coverage.
Configure only the disposable CI MySQL user with the authentication method supported by PHP 7.1, and let both matrix jobs report their results.
Separate fixture execution from WordPress function adapters and scope two exceptions to the MySQL constants required by the disposable database harness.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A previously accepted signed SAML assertion can currently be submitted again to establish another WordPress login. Claim its ID in the database after response validation and before user provisioning or sign-in, so only one login can use it, including when copies arrive concurrently.
Use the existing options table with autoload disabled and a key derived from the configured IdP and assertion ID. Multisite destinations share the current network's main-site table. Forwarding does not consume the assertion, and a storage failure blocks sign-in.
Strict validation remains unchanged. Replay records are retained indefinitely because deleting a record while expired assertions remain acceptable would allow that assertion to be used again. This prevents reuse after the first accepted login; it does not reject an expired assertion on its first submission. Independent installations do not share replay records.
Validation:
This pull request was opened by AI on Joe's behalf.
Delivers: https://github.com/humanmade/product-dev/issues/2390