1 |
commit: 88734bdce07b0a1bfb92bac2338fe0adc5570510 |
2 |
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Feb 15 11:35:00 2018 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 15 14:27:11 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88734bdc |
7 |
|
8 |
dev-python/dugong: remove unused patch. |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/7191 |
11 |
|
12 |
.../dugong/files/dugong-3.7-test-html-escape.patch | 46 ---------------------- |
13 |
1 file changed, 46 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/dugong/files/dugong-3.7-test-html-escape.patch b/dev-python/dugong/files/dugong-3.7-test-html-escape.patch |
16 |
deleted file mode 100644 |
17 |
index ba2ee587d0c..00000000000 |
18 |
--- a/dev-python/dugong/files/dugong-3.7-test-html-escape.patch |
19 |
+++ /dev/null |
20 |
@@ -1,46 +0,0 @@ |
21 |
-# HG changeset patch |
22 |
-# User Zac Medico <zmedico@g.o> |
23 |
-# Date 1494468556 25200 |
24 |
-# Branch test-quote-html |
25 |
-# Node ID b8a28438442ec12cd4067fd3240d9afc8e6998da |
26 |
-# Parent a986296769f3fc4daa0f29fe28b857f43d05634d |
27 |
-Use html.escape for python3.6 compat |
28 |
- |
29 |
-https://bitbucket.org/nikratio/python-dugong/pull-requests/3 |
30 |
- |
31 |
-diff --git a/test/test_dugong.py b/test/test_dugong.py |
32 |
---- a/test/test_dugong.py |
33 |
-+++ b/test/test_dugong.py |
34 |
-@@ -24,7 +24,7 @@ |
35 |
- from dugong import (HTTPConnection, BodyFollowing, CaseInsensitiveDict, _join, |
36 |
- ConnectionClosed) |
37 |
- import dugong |
38 |
--from http.server import BaseHTTPRequestHandler, _quote_html |
39 |
-+from http.server import BaseHTTPRequestHandler |
40 |
- from io import TextIOWrapper |
41 |
- from base64 import b64encode |
42 |
- import http.client |
43 |
-@@ -34,6 +34,7 @@ |
44 |
- import ssl |
45 |
- import re |
46 |
- import os |
47 |
-+import html |
48 |
- import hashlib |
49 |
- import threading |
50 |
- import socketserver |
51 |
-@@ -1163,9 +1164,12 @@ |
52 |
- message = shortmsg |
53 |
- explain = longmsg |
54 |
- self.log_error("code %d, message %s", code, message) |
55 |
-- # using _quote_html to prevent Cross Site Scripting attacks (see bug #1100201) |
56 |
-- content = (self.error_message_format % {'code': code, 'message': _quote_html(message), |
57 |
-- 'explain': explain}).encode('utf-8', 'replace') |
58 |
-+ # HTML encode to prevent Cross Site Scripting attacks (see bug #1100201) |
59 |
-+ content = (self.error_message_format % { |
60 |
-+ 'code': code, |
61 |
-+ 'message': html.escape(message, quote=False), |
62 |
-+ 'explain': explain |
63 |
-+ }).encode('utf-8', 'replace') |
64 |
- self.send_response(code, message) |
65 |
- self.send_header("Content-Type", self.error_content_type) |
66 |
- self.send_header("Content-Length", str(len(content))) |