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 28 29 30 31 32 33 34 35 36 37
|
Description: Allow building in paths with version-number characters
werkzeug.secure_filename (called from add_attachment) strips out most
special characters, including some allowed in Debian version numbers
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no
--- a/tests/test_pagure_flask_ui_issues.py
+++ b/tests/test_pagure_flask_ui_issues.py
@@ -3539,7 +3539,7 @@ class PagureFlaskIssuestests(tests.Model
folder = os.path.dirname(os.path.abspath(__file__))[1:].replace(
"/", "_"
- )
+ ).replace("+", "").replace("~", "").replace(":", "").replace("%", "")
exp = {
"filelocations": [
"/test/issue/raw/files/8a06845923010b27bfd8"
@@ -3666,7 +3666,7 @@ class PagureFlaskIssuestests(tests.Model
folder = os.path.dirname(os.path.abspath(__file__))[1:].replace(
"/", "_"
- )
+ ).replace("+", "").replace("~", "").replace(":", "").replace("%", "")
exp = {
"output": "ok",
"filelocations": [
@@ -3741,7 +3741,7 @@ class PagureFlaskIssuestests(tests.Model
"/issue/raw/8a06845923010b27bfd8"
"e7e75acff7badc40d1021b4994e01f5e11ca40bc3a"
"be-%s_placebo.png"
- % os.path.dirname(os.path.abspath(__file__))[1:].replace("/", "_")
+ % os.path.dirname(os.path.abspath(__file__))[1:].replace("/", "_").replace("+", "").replace("~", "").replace(":", "").replace("%", "")
)
output = self.app.get("/foo" + url)
|