Skip to content

Commit ba8b4fd

Browse files
author
Matthieu Honel
committed
Merge branch 'release/2.8.2'
2 parents ec8e497 + ff30b36 commit ba8b4fd

File tree

7 files changed

+27
-2
lines changed

7 files changed

+27
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Since data is pulled from YWH platform to your server, only regular outbound web
5454
- removed the GUI from the default installation (use `pip install 'ywh2bt[gui]'` to include the GUI)
5555
- fixed an issue with github when the title of an issue is longer than 255 characters
5656
- fixed an issue with jira image previews when multiple attached images have the same name
57+
- fixed an issue when a report/comment has no attachments and the description contains an invalid URL
5758
- v2.7:
5859
- added synchronization of "fix verification" logs when "Upload status updates" is checked
5960
- fixed an issue with jira when scope contains special markdown characters

docs/User-Guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ the content is put into a Markdown file which is attached to the issue or commen
420420
- References to a same uploaded attachment in different comments is not supported yet,
421421
i.e., if an attachment is referenced (either displayed inline or as a link) in several comments,
422422
only first one will be correctly handled.
423+
- The GUI is not compatible with python 3.8.0 on Windows 10 (for some reason)
423424

424425
# Resources
425426

docs/user-guide/User-Guide.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="generator" content="pandoc" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7-
<meta name="keywords" content="md5sum=8139b00148bbe3104fb70ae5f6ef5726" />
7+
<meta name="keywords" content="md5sum=59557af67638b92952595760ad5e564c" />
88
<title>YWH2BT User Guide</title>
99
<style>
1010
html {
@@ -842,6 +842,7 @@ <h2 data-number="5.6"><span class="header-section-number">5.6</span> Miscellaneo
842842
<li>Since v2.5.0, the <a href="https://www.yeswehack.com">Yes We Hack platform</a> API URL has been changed to <code>https://api.yeswehack.com</code>.</li>
843843
<li>Since v2.0.0, unlike in previous versions, setting a tracked report back to &quot;Ask for integration&quot; won&#39;t create a new issue in the tracker but update the existing one.</li>
844844
<li>References to a same uploaded attachment in different comments is not supported yet, i.e., if an attachment is referenced (either displayed inline or as a link) in several comments, only first one will be correctly handled.</li>
845+
<li>The GUI is not compatible with python 3.8.0 on Windows 10 (for some reason)</li>
845846
</ul>
846847
</section>
847848
</section>

docs/user-guide/User-Guide.pdf

99 Bytes
Binary file not shown.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ywh2bt"
3-
version = "2.8.1"
3+
version = "2.8.2"
44
description = "ywh2bt - YesWeHack to Bug Tracker"
55
readme = "README.md"
66
authors = ["m.honel <m.honel@yeswehack.com>"]

ywh2bt/core/html.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ def cleanup_attachments_and_urls_from_html(
159159
Returns:
160160
the cleaned html
161161
"""
162+
if not attachments:
163+
return html, attachments
162164
clean_attachments = []
163165
clean_attachments_urls = []
164166
attachments_domains: Set[str] = set()

ywh2bt/tests/core/test_html.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import unittest
2+
from typing import List
23

34
from ywh2bt.core.api.models.report import Attachment
45
from ywh2bt.core.html import (
@@ -115,6 +116,25 @@ def test_cleanup_attachments_and_urls_from_html(self) -> None:
115116
</a>""",
116117
)
117118

119+
def test_cleanup_attachments_and_urls_from_html_evil_domain(self) -> None:
120+
attachments: List[Attachment] = []
121+
html = """
122+
<a href="https://[EVIL_DOMAIN]/1234?ijkl">
123+
https://ywh.domain/1234
124+
</a>"""
125+
cleaned_html, cleaned_attachments = cleanup_attachments_and_urls_from_html(
126+
html=html,
127+
attachments=attachments,
128+
)
129+
self.assertEqual(0, len(cleaned_attachments))
130+
self.assertEqual(
131+
cleaned_html,
132+
"""
133+
<a href="https://[EVIL_DOMAIN]/1234?ijkl">
134+
https://ywh.domain/1234
135+
</a>""",
136+
)
137+
118138
def _build_attachment(
119139
self,
120140
url: str,

0 commit comments

Comments
 (0)