gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. e3b0cff5506ff6ed7ecf


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. e3b0cff5506ff6ed7ecfc19654c1e61a7ad3d621
Date: Wed, 29 Dec 2010 10:07:29 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  e3b0cff5506ff6ed7ecfc19654c1e61a7ad3d621 (commit)
      from  399c42b5702bac224c86b51da07f85e6f2685b2d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=e3b0cff5506ff6ed7ecfc19654c1e61a7ad3d621


commit e3b0cff5506ff6ed7ecfc19654c1e61a7ad3d621
Author: antrik <address@hidden>
Date:   Thu Nov 25 11:49:04 2010 +0100

    npapi/writelauncher: Prevent script parameter strings from escaping shell 
quoting
    
    Make sure a ' character in the parameter string doesn't escape the shell
    quoting. This is accomplished by replacing it with a '\'' sequence, i.e.
    ending the single quoting, including an explicitely quoted single quote
    character, and starting the quoting again.
    
    As the substitution using boost's string algorithm library is trivial,
    just do it inline it the script writing statements.

diff --git a/plugin/npapi/plugin.cpp b/plugin/npapi/plugin.cpp
index 42c2859..3dcced5 100644
--- a/plugin/npapi/plugin.cpp
+++ b/plugin/npapi/plugin.cpp
@@ -35,6 +35,7 @@
 #endif
 
 #include <boost/format.hpp>
+#include <boost/algorithm/string/replace.hpp>
 
 #define MIME_TYPES_HANDLED  "application/x-shockwave-flash"
 // The name must be this value to get flash movies that check the
@@ -968,7 +969,11 @@ create_standalone_launcher(const std::string& page_url, 
const std::string& swf_u
         itEnd = params.end(); it != itEnd; ++it) {
         const std::string& nam = it->first; 
         const std::string& val = it->second;
-        saLauncher << "-P '" << nam << "=" << val << "' ";
+        saLauncher << "-P '"
+                   << boost::algorithm::replace_all_copy(nam, "'", "'\\''")
+                   << "="
+                   << boost::algorithm::replace_all_copy(val, "'", "'\\''")
+                   << "' ";
     }
 
     saLauncher << "'" << swf_url << "' "

-----------------------------------------------------------------------

Summary of changes:
 plugin/npapi/plugin.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]