snowflakedb / snowflake-connector-python

Snowflake Connector for Python
https://pypi.python.org/pypi/snowflake-connector-python/
Apache License 2.0
568 stars 456 forks source link

SNOW-1473581: Fix SSO url validator for nested urls #1974

Closed sfc-gh-yixie closed 3 weeks ago

sfc-gh-yixie commented 3 weeks ago

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #SNOW-1473581 Fixes #1973

  2. Fill out the following pre-review checklist:

    • [x] I am adding a new automated test(s) to verify correctness of my new code
    • [ ] I am adding new logging messages
    • [ ] I am adding a new telemetry message
    • [ ] I am modifying authorization mechanisms
    • [ ] I am adding new credentials
    • [ ] I am modifying OCSP code
    • [ ] I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Update the RE of the url validator to accept : in the query params.

sfc-gh-hchaturvedi commented 3 weeks ago

From a correctness perspective this change looks good to me, but given the recent pattern validator issues that have happened, it would be good to get this reviewed by security. We just want to make sure that we cover our grounds when it comes to possible patterns that can be considered valid based on this regex.