File: Security-Fix-vulnerable-example-of-PYTHONPATH.patch

package info (click to toggle)
twisted 25.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 20,460 kB
  • sloc: python: 203,167; makefile: 200; sh: 92; javascript: 36; xml: 31
file content (27 lines) | stat: -rw-r--r-- 1,187 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Free Ekanayaka <free.ekanayaka@gmail.com>
Date: Fri, 21 Oct 2016 09:21:44 +0000
Subject: Security: Fix vulnerable example of PYTHONPATH

Modify the PYTHONPATH variable within the HOWTO section so it's less
insecure while usage.

Forwarded: no
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605190
---
 docs/core/howto/quotes.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/core/howto/quotes.rst b/docs/core/howto/quotes.rst
index 163d67b..d171a07 100644
--- a/docs/core/howto/quotes.rst
+++ b/docs/core/howto/quotes.rst
@@ -65,7 +65,8 @@ following:
 #. Add the ``TwistedQuotes`` directory's *parent* to your Python
    path. For example, if the TwistedQuotes directory's path is
    ``/mystuff/TwistedQuotes`` or ``c:\mystuff\TwistedQuotes`` 
-   add ``/mystuff`` to your Python path. On UNIX this would be ``export PYTHONPATH=/mystuff:$PYTHONPATH`` , on Microsoft
+   add ``/mystuff`` to your Python path. On UNIX this would be ``export PYTHONPATH=/mystuff${PYTHONPATH:+:$PYTHONPATH}
+`` , on Microsoft
    Windows change the ``PYTHONPATH`` variable through the
    Systems Properties dialog by adding ``;c:\mystuff`` at the
    end.