View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000905 | bareos-core | webui | public | 2018-02-08 16:09 | 2019-12-18 15:25 |
Reporter | stephane | Assigned To | frank | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Windows 8 | OS | Windows | OS Version | 8 |
Product Version | 17.2.4 | ||||
Summary | 0000905: Restore WebUI - Enable to browse directory when a file name contain a single quote | ||||
Description | In the restore menu select a job and browse accross directory with a file contain a single quote , it say "Oops, something went wrong, probably too many files." in the file Restore/src/Restore/Controller/RestoreController.php in Buildsubtree function for a file, the addslaches function escape the file name for the "text" value : …{"id":"194117","text":"l\'aurore.txt","icon":"glyphicon glyphicon-file","state":"","data":{"lstat":"A A IH\/ B A A g J A A BafE\/H BafE\/m BafFJS A A L","type":"F","linkfileindex":0,"pathid":6335,"stat":{"atime":1518096327,"dev":0,"size":9,"ino":0,"mode":33279,"nlink":1,"user":"root","group":"root","rdev":32,"mtime":1518096358,"ctime":1518096978},"fileid":194117,"jobid":62,"name":"l\u0027aurore.txt"}}… without the addslashes function json is ok and you can browse the directory: {"id":"194117","text":"l'aurore.txt","icon":"glyphicon glyphicon-file","state":"","data":{"lstat":"A A IH\/ B A A g J A A BafE\/H BafE\/m BafFJS A A L","type":"F","linkfileindex":0,"pathid":6335,"stat":{"atime":1518096327,"dev":0,"size":9,"ino":0,"mode":33279,"nlink":1,"user":"root","group":"root","rdev":32,"mtime":1518096358,"ctime":1518096978},"fileid":194117,"jobid":62,"name":"l\u0027aurore.txt"} regards | ||||
Tags | No tags attached. | ||||
child of | 0000910 | closed | Release bareos-17.2.5 |
bareos-webui: bareos-17.2 ee232a6f 2018-02-13 19:43 Ported: N/A Details Diff |
Fix to bugreport 0000905 and 0000893 Regarding 0000905: When returning an Ajax result, inside a json string value don't use addslashes. You don't want both " and ' escaped at the same time. Instead just use str_replace('"','\"',$Str). Regarding 0000893: A misplaced dir and file separator ',' lead to malformed json which could result in a non loadable subtree. Fixes 0000893: webui cannot list dirs with only files in them Fixes 0000905: Restore WebUI - Enable to browse directory when a file name contain a single quote |
Affected Issues 0000893, 0000905 |
|
mod - module/Restore/src/Restore/Controller/RestoreController.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-08 16:09 | stephane | New Issue | |
2018-02-08 18:13 | joergs | Assigned To | => frank |
2018-02-08 18:13 | joergs | Status | new => assigned |
2018-02-13 18:16 | frank | Status | assigned => confirmed |
2018-02-13 18:52 | frank | Changeset attached | => bareos-webui bareos-17.2 ee232a6f |
2018-02-13 18:52 | frank | Note Added: 0002910 | |
2018-02-13 18:52 | frank | Status | confirmed => resolved |
2018-02-13 18:52 | frank | Resolution | open => fixed |
2018-02-13 18:56 | frank | Relationship added | child of 0000910 |
2019-12-18 15:25 | arogge | Status | resolved => closed |