You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2018/07/18 19:28:24 UTC

[trafficserver] branch 6.2.x updated: Adds better sanity checks around the method IX

This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch 6.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/6.2.x by this push:
     new 0bc55fe  Adds better sanity checks around the method IX
0bc55fe is described below

commit 0bc55fe9b36b9585a3e6203afd303d25a4de24d5
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Tue Feb 27 19:34:10 2018 -0700

    Adds better sanity checks around the method IX
    
    (cherry picked from commit e7517f393e97f405ce655736ff3f2b2ea6910717)
---
 proxy/http/remap/UrlRewrite.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/http/remap/UrlRewrite.cc b/proxy/http/remap/UrlRewrite.cc
index aab5918..915dd40 100644
--- a/proxy/http/remap/UrlRewrite.cc
+++ b/proxy/http/remap/UrlRewrite.cc
@@ -402,7 +402,7 @@ UrlRewrite::PerformACLFiltering(HttpTransact::State *s, url_mapping *map)
       bool match = true;
 
       if (rp->method_restriction_enabled) {
-        if (method_wksidx != -1) {
+        if (method_wksidx >= 0 && method_wksidx < HTTP_WKSIDX_METHODS_CNT) {
           match = rp->standard_method_lookup[method_wksidx];
         } else if (!rp->nonstandard_methods.empty()) {
           int method_str_len;