mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 20:15:58 +03:00
[GH-ISSUE #237] Cannot rename a document #189
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @okoetter on GitHub (Dec 1, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/237
Originally assigned to: @ciur on GitHub.
Description
After update from 1.5.0 to 1.5.2 I am not able to rename a document. No error message shown.
Expected
Document renamed and new file name displayed in breadcrumb navigation.
Actual
Nothing after rename dialog closes.
Info:
I am aware that I should not post issues for the Linuxserver docker image. And your demo installation works just fine. So maybe I have a problem with older documents being upgraded - maybe some permissions problems.
My intention with this issue is to ask whether there is a logfile that may show further info to help me investigate this issue?
@ciur commented on GitHub (Dec 1, 2020):
@okoetter, thanks for quick heads-up.
Yes, indeed there is a problem. In hurry I messed it up.

You can confirm that we speak about same problem. If your browser is firefox or chrome, when renaming a document you will see "file_orig" field is required message.
To mitigate XSS vulnerabilities I added additional checks. However, I forget to remove legacy document fields on document model. Bad, Eugen!
@ciur commented on GitHub (Dec 1, 2020):
I will fix in asap. Thanks for heads-up again!
@ciur commented on GitHub (Dec 1, 2020):
@okoetter , I just pushed 1.5.3 which should fix this issue.
Could you please test against 1.5.3 ?
@okoetter commented on GitHub (Dec 1, 2020):
I can confirm that it works with the new version, thank you!
But I still get 1.5.2 shown at the bottom right, did you forget to bump the version number?
@okoetter commented on GitHub (Dec 1, 2020):
BTW: I just wanted to rename a file with a date in the format "10/2020" in the name. That did not work, json result was "Enter only safe characters.". I then used "10-2020" and that worked. Maybe the error message should be shown to the user!
@l4rm4nd commented on GitHub (Dec 1, 2020):
@ciur
Escaping all user input properly should mitigate XSS attacks. There is no need for further regex validations, which disallow potentially necessary special chars like / as @okoetter mentioned.
@ciur commented on GitHub (Dec 1, 2020):
oh, stupid me, 😠 ! When I fixed that XSS thingy, I thought -
who would need a slash in their file name❓ ❔ ❓I will fix
format "10/2020" in the name. That did not work, json result was "Enter only safe characters."problem by removing regexp validation as @l4rm4nd mentioned.But won't rush this time for the next quick 1.5.4 release. I will wait for other bugs to pile up, fix them, test them properly, and then release 1.5.4 towards end of December 2020.
@l4rm4nd, @okoetter thank you guys for your contributions!
Feels great to have onboard a security guy and an external user of the system! Like a real company!
@ciur commented on GitHub (Dec 23, 2020):
fixed in 1.5.4