[GH-ISSUE #272] run_tests.sh fails on latest release 1.5.4 #217

Closed
opened 2026-02-25 21:31:28 +03:00 by kerem · 2 comments
Owner

Originally created by @amo13 on GitHub (Dec 25, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/272

Originally assigned to: @ciur on GitHub.

With the latest release 1.5.4, the run_tests fails with the following results:

Creating test database for alias 'default'...
System check identified no issues (0 silenced).
..........................................................F.................s.s...........................................................................................................................
======================================================================
FAIL: test_folder_validation_against_xss_titles (papermerge.test.test_document.TestDocument)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/amo/.cache/yay/papermerge/src/papermerge-1.5.4/papermerge/test/test_document.py", line 369, in test_folder_validation_against_xss_titles
    folder_a.full_clean()
AssertionError: ValidationError not raised

----------------------------------------------------------------------
Ran 202 tests in 13.503s

FAILED (failures=1, skipped=2)
Destroying test database for alias 'default'...

Maybe this (test_folder_validation_against_xss_titles) has something to do with #271?

Originally created by @amo13 on GitHub (Dec 25, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/272 Originally assigned to: @ciur on GitHub. With the latest release 1.5.4, the run_tests fails with the following results: ``` Creating test database for alias 'default'... System check identified no issues (0 silenced). ..........................................................F.................s.s........................................................................................................................... ====================================================================== FAIL: test_folder_validation_against_xss_titles (papermerge.test.test_document.TestDocument) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/amo/.cache/yay/papermerge/src/papermerge-1.5.4/papermerge/test/test_document.py", line 369, in test_folder_validation_against_xss_titles folder_a.full_clean() AssertionError: ValidationError not raised ---------------------------------------------------------------------- Ran 202 tests in 13.503s FAILED (failures=1, skipped=2) Destroying test database for alias 'default'... ``` Maybe this (`test_folder_validation_against_xss_titles`) has something to do with #271?
kerem 2026-02-25 21:31:28 +03:00
Author
Owner

@ciur commented on GitHub (Dec 26, 2020):

@amo13, the failed test is related to #228. I fixed #228 by escaping user input (correct mitigation of XSS) instead of validating user input with custom filters (latter is checked by failing test). Because custom filters validation "feature" was replaced with escape that tests is obsolete and should be removed anyway.

Let me put in other words: failing test was removed immediately AFTER release 1.5.4 was tagged. Correct it would be to remove failing test BEFORE tagging release 1.5.4.
I am not sure how to mitigate this situation.

<!-- gh-comment-id:751321749 --> @ciur commented on GitHub (Dec 26, 2020): @amo13, the failed test is related to #228. I fixed #228 by escaping user input (correct mitigation of XSS) instead of validating user input with custom filters (latter is checked by failing test). Because custom filters validation "feature" was replaced with escape that tests is obsolete and should be removed anyway. Let me put in other words: failing test was removed immediately AFTER release 1.5.4 was tagged. Correct it would be to remove failing test BEFORE tagging release 1.5.4. I am not sure how to mitigate this situation.
Author
Owner

@amo13 commented on GitHub (Dec 26, 2020):

Ok, thank you for your reply!
Good that the failing test has already been removed from the test script :)

I am not sure how to mitigate this situation.

Maybe simply by creating a 1.5.5 release?

<!-- gh-comment-id:751345011 --> @amo13 commented on GitHub (Dec 26, 2020): Ok, thank you for your reply! Good that the failing test has already been removed from the test script :) > I am not sure how to mitigate this situation. Maybe simply by creating a 1.5.5 release?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#217
No description provided.