trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] branch master updated: Add fix for leaking url string
Date Thu, 01 Mar 2018 17:32:19 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 901cb6d  Add fix for leaking url string
901cb6d is described below

commit 901cb6d423c780b132ab6be5503ed41fc25bb177
Author: Evan Zelkowitz <19699200+ezelkow1@users.noreply.github.com>
AuthorDate: Fri Feb 23 16:05:34 2018 -0700

    Add fix for leaking url string
---
 plugins/experimental/uri_signing/uri_signing.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/plugins/experimental/uri_signing/uri_signing.c b/plugins/experimental/uri_signing/uri_signing.c
index b41c093..f375592 100644
--- a/plugins/experimental/uri_signing/uri_signing.c
+++ b/plugins/experimental/uri_signing/uri_signing.c
@@ -256,13 +256,23 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri)
     last_mark = checkpoints[i];
   }
   PluginDebug("Spent %" PRId64 " ns uri_signing verification of %.*s.", mark_timer(&t),
url_ct, url);
+  TSfree((void *)url);
   return TSREMAP_NO_REMAP;
 fail:
   if (uri_matches_auth_directive((struct config *)ih, url, url_ct)) {
+    if (url != NULL) {
+      TSfree((void *)url);
+    }
     return TSREMAP_NO_REMAP;
   }
+
   PluginDebug("Invalid JWT for %.*s", url_ct, url);
   TSHttpTxnSetHttpRetStatus(txnp, TS_HTTP_STATUS_FORBIDDEN);
   PluginDebug("Spent %" PRId64 " ns uri_signing verification of %.*s.", mark_timer(&t),
url_ct, url);
+
+  if (url != NULL) {
+    TSfree((void *)url);
+  }
+
   return TSREMAP_DID_REMAP;
 }

-- 
To stop receiving notification emails like this one, please contact
bcall@apache.org.

Mime
View raw message