Projects
Kube:Winterfell
python-pygments
fix-shell-injection-in-font-manager.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-shell-injection-in-font-manager.patch of Package python-pygments
--- Pygments-2.0.2/pygments/formatters/img.py 2014-11-10 14:17:51.000000000 -0500 +++ Pygments-2.0.2/pygments/formatters/img.py 2015-10-29 10:34:04.992062621 -0400 @@ -10,6 +10,7 @@ """ import sys +import shlex from pygments.formatter import Formatter from pygments.util import get_bool_opt, get_int_opt, get_list_opt, \ @@ -30,6 +31,13 @@ except ImportError: _winreg = None +# Try to find a usable shell quote +try: + shell_quote = shlex.quote +except AttributeError: + import pipes + shell_quote = pipes.quote + __all__ = ['ImageFormatter', 'GifImageFormatter', 'JpgImageFormatter', 'BmpImageFormatter'] @@ -79,8 +87,8 @@ from commands import getstatusoutput except ImportError: from subprocess import getstatusoutput - exit, out = getstatusoutput('fc-list "%s:style=%s" file' % - (name, style)) + exit, out = getstatusoutput('fc-list %s file' % + shell_quote("%s:style=%s" % (name, style))) if not exit: lines = out.splitlines() if lines:
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.