WordPress / Requests

Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.
https://requests.ryanmccue.info/
Other
3.57k stars 494 forks source link

New `InputValidator::is_valid_rfc2616_token()` method #849

Closed jrfnl closed 6 months ago

jrfnl commented 9 months ago

Pull Request Type

This is a:

Context

The new method is intended to be used as a helper to allow for making solving #845 / #847 more straight-forward.

Detailed Description

This new method validates that an arbitrary input parameter can be considered valid for use as a "token" as per the RFC 2616 specification.

Includes tests.

Ref: https://datatracker.ietf.org/doc/html/rfc2616#section-2.2

schlessera commented 8 months ago

@jrfnl I've made the changes we've discussed in the call. Do you want to take a final look?

jrfnl commented 8 months ago

@schlessera Thanks for working on this together. all looks good to me.

jrfnl commented 8 months ago

@schlessera Shall I clean up the branch before merge ? Or will you squash merge ?