1. 11 8月, 2023 2 次提交
  2. 09 8月, 2023 3 次提交
    • B
      http1connection: Make content-length parsing more strict · bf90f3a9
      Ben Darnell 提交于
      Content-length and chunk size parsing now strictly matches the RFCs.
      We previously used the python int() function which accepted leading
      plus signs and internal underscores, which are not allowed by the
      HTTP RFCs (it also accepts minus signs, but these are less problematic
      in this context since they'd result in errors elsewhere)
      
      It is important to fix this because when combined with certain proxies,
      the lax parsing could result in a request smuggling vulnerability (if
      both Tornado and the proxy accepted an invalid content-length but
      interpreted it differently). This is known to occur with old versions
      of haproxy, although the current version of haproxy is unaffected.
      bf90f3a9
    • B
      Merge pull request #3305 from bdarnell/redirect-test-windows · fe6c125b
      Ben Darnell 提交于
      web_test: Fix open redirect test on windows
      fe6c125b
    • B
      web_test: Fix open redirect test on windows · 418f63ad
      Ben Darnell 提交于
      Drive letters in windows absolute paths mess up this test,
      so remove them and use a path relative to the drive root instead.
      418f63ad
  3. 07 8月, 2023 1 次提交
  4. 04 8月, 2023 1 次提交
  5. 27 7月, 2023 10 次提交
  6. 26 7月, 2023 2 次提交
  7. 23 7月, 2023 5 次提交
  8. 20 7月, 2023 1 次提交
  9. 08 7月, 2023 10 次提交
  10. 22 6月, 2023 5 次提交
    • B
      Merge pull request #3276 from bdarnell/open-redirect-test · 6e3521da
      Ben Darnell 提交于
      test: Add test for open redirect fixed in 6.3.2
      6e3521da
    • B
      test: Add test for open redirect fixed in 6.3.2 · b5624573
      Ben Darnell 提交于
      b5624573
    • B
      Merge pull request #3288 from bdarnell/enable-312 · cb5db3bb
      Ben Darnell 提交于
      Updates for Python 3.12
      cb5db3bb
    • B
      *: Adapt to deprecation of datetime utc methods · 4d4d80c1
      Ben Darnell 提交于
      Python 3.12 deprecates the utcnow and utcfromtimestamp methods and
      discourages the use of naive datetimes to represent UTC. This was
      previously the main way that Tornado used datetimes (since it was
      the only option available in Python 2 before the introduction
      of datetime.timezone.utc in Python 3.2).
      
      - httpclient_test: Test-only change to test that both kinds of datetimes
        are supported in If-Modified-Since (this just calls
        httputil.format_timestamp)
      - httputil: No functional changes, but format_timestamp's
        support for both naive and aware datetimes is now tested.
      - locale: format_timestamp now supports aware datetimes (in
        addition to the existing support for naive datetimes).
      - web: Cookie expirations internally use aware datetimes.
        StaticFileHandler.get_modified_time now supports both and the
        standard implementation returns aware.
      
      It feels fragile that "naive" and "aware" datetimes are not distinct
      types but subject to data-dependent behavior. This change uses
      "aware" datetimes throughout Tornado, but some operations (comparisons
      and subtraction) fail with mixed datetime types and if I missed any
      in this change may cause errors if naive datetimes were used (where
      previously naive datetimes would have been required). But that's
      apparently the API we have to work with.
      4d4d80c1
    • B
      build: Upgrade tox to support python 3.12 · 4c6b8cac
      Ben Darnell 提交于
      4c6b8cac