Skip to content

Conversation

@danobi
Copy link
Member

@danobi danobi commented Nov 30, 2015

Validate the host header string to prevent malformed hostnames from being let in.

Validate the host header string to prevent malformed hostnames from being let in.
Copy link
Member

Choose a reason for hiding this comment

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

What about colons for IPv6 addresses?

@jpeach
Copy link
Contributor

jpeach commented Nov 30, 2015

Can you extract the guts of validate_hdr_host into a separate function and use that to add a regression test host validation?

Are you sure that the the return value of ats_ip_parse really makes sense? It looks like this code depends on it returning a successful status but not parsing any bytes.

@SolidWallOfCode
Copy link
Member

James - so split out validate_hdr_field which takes a char const* and make a regression test for that?

The use of ats_ip_parse is correct. It operates on a string and returns the separate pieces of the string. The use of the port and rest values has exactly the same dependency.

@jpeach
Copy link
Contributor

jpeach commented Dec 1, 2015

so split out validate_hdr_field which takes a char const* and make a regression test for that?

yup

Was missing a few characters, specifically the ones for IPv6
Split out host header checking code into `validate_hdr_field()`
so that a regression test for invalid FQDNs could be added.
@asfgit asfgit closed this in ada9752 Dec 18, 2015
SolidWallOfCode pushed a commit to SolidWallOfCode/trafficserver that referenced this pull request Feb 1, 2017
YTSATS-1101: ATS handling of too many concurrent streams too agressive
maskit pushed a commit to maskit/trafficserver that referenced this pull request Feb 2, 2017
* asf/master: (392 commits)
  Doh, chomp does not trim WS ...
  Make sure any trailing WS is removed from the Jira summary
  Change the changelog.pl script to use /usr/bin/env to find perl
  TS-4089: clang-format
  [TS-4091] addressing internal headers This close apache#387.
  TS-4089: Fixed coverity issues in parent selection.
  TS-4074: Escape backslashes in user/group/machine name
  TS-4043: Prevent bogus FQDN characters in host header This close apache#356.
  TS-3418: clang-format
  This closes apache#190.
  This closes apache#321.
  TS-4071: Unused mutex Diags::rotate_lock
  TS-3418: Various style fixes.
  TS-3418: Refactored parent selection to add a secondary parent consistent hash ring.
  This closes apache#368.
  TS-4084: Empty README.md file
  TS-4079: Support for arbitrary esi vars through HTTP request headers. This closes apache#378
  TS-3944: Add documentation for TSHttpTxnServerAddrSet to clarify when it must be called. This close apache#385.
  Clang format.
  TS-3908: Fix clang errors in WCCP.
  ...
bneradt pushed a commit to bneradt/trafficserver that referenced this pull request Nov 19, 2020
moonchen pushed a commit to moonchen/trafficserver that referenced this pull request Jul 26, 2022
…pache#356)

* Add autest to cover updates to cache with alternates

* remove trailing line(autopep8)

* add comments describing the requests

* reduce delay and max-age on test

* set cache object size to zero when incoming content length is zero

* add demystifying comment

Co-authored-by: Chris McFarlen <cmcfarlen@apple.com>
(cherry picked from commit 4c5b182)

Co-authored-by: Chris McFarlen <chris@mcfarlen.us>
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.

3 participants