]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2594 in SNORT/snort3 from ~KAMURTHI/snort3:http2_https to master
authorShravan Rangarajuvenkata (shrarang) <shrarang@cisco.com>
Thu, 5 Nov 2020 19:54:29 +0000 (19:54 +0000)
committerShravan Rangarajuvenkata (shrarang) <shrarang@cisco.com>
Thu, 5 Nov 2020 19:54:29 +0000 (19:54 +0000)
Squashed commit of the following:

commit 05c21e9ad5c54b6cd37ba55ad9e3324a3bb0e290
Author: Kanimozhi Murthi <kamurthi@cisco.com>
Date:   Mon Nov 2 12:11:14 2020 -0500

    appid: prefix http/2 decrypted url with "https://

src/network_inspectors/appid/appid_http_session.cc

index 50efedae94853a7297e16008d8d020f5be45324e..03609acd7de595ffdd2aa9f31fbdff4b10637135 100644 (file)
@@ -725,7 +725,10 @@ void AppIdHttpSession::update_url(AppidChangeBits& change_bits)
     {
         if (meta_data[MISC_URL_FID])
             delete meta_data[MISC_URL_FID];
-        meta_data[MISC_URL_FID] = new std::string(std::string("http://") + *host + *uri);
+        if (asd.get_session_flags(APPID_SESSION_DECRYPTED))
+            meta_data[MISC_URL_FID] = new std::string(std::string("https://") + *host + *uri);
+        else
+            meta_data[MISC_URL_FID] = new std::string(std::string("http://") + *host + *uri);
         change_bits.set(APPID_URL_BIT);
     }
 }