View Issue Details

IDProjectCategoryView StatusLast Update
0001020bareos-corewebuipublic2021-12-21 13:56
Reporterlinkstat Assigned Tofrank  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSDebianOS Version9
Product Version18.2.4-rc1 
Summary0001020: Can not restore a client with spaces in its name
DescriptionAll my clients have names with spaces on their names like "client-fd using Catalog-XXX"; correctly handled (ie, enclosing the name in quotation marks, or escaping the space with \), this has not represented any problem... until now. Webui can even perform backup tasks (previously defined in the configuration files) and has not presented problems with the spaces. But when it came time to restore something ... it just does not seem to be able to properly handle the character strings that contain spaces inside. Apparently, cuts the string to first place especially found (as you can see by looking at the attached image).
Steps To ReproduceDefine a client whose name contains spaces inside, such as "hostname-fd Testing Client".
Try to restore a backup from Webui to that client (it does not matter that the backup was originally made in that client or that the newly defined client is a new destination for the restoration of a backup previously made in another client).
Webui will fail by saying "invalid client argument: hostname-fd". As you can see, Webui will "cut" the client's name to the first string before the first space, and since there is no hostname-fd client, the task will fail; or worse, if additionally there was a client whose name matched the first string before the first space, Webui will restore the wrong client.
Additional Informationbconsole does not present any problem when the clients contain spaces in their names (this of course, when the spaces are correctly handled by the human operator who writes the commands, either by enclosing the name with quotation marks, or escaping spaces with a backslash).
TagsNo tags attached.

Relationships

related to 0000981 resolved can not see file names when restoring 
related to 0001383 closedarogge Release Bareos 18.2.12 
related to 0001384 closedarogge_adm Release Bareos 19.2.11 
related to 0001361 closedarogge Release Bareos 20.0.3 
related to 0001289 closedarogge Release Bareos 21.0.0 

Activities

linkstat

linkstat

2018-10-10 09:37

reporter  

linkstat

linkstat

2019-07-31 18:03

reporter   ~0003546

Hello!

Any news regarding this problem? (or any ideas about how to patch it temporarily so that you can use webui for the case described)?
Sometimes it is tedious to use bconsole all the time instead of webui ...

Regards!
frank

frank

2021-07-21 15:22

developer   ~0004185

Fix committed to bareos master branch with changesetid 15068.
frank

frank

2021-07-22 15:22

developer   ~0004188

Fix committed to bareos bareos-19.2 branch with changesetid 15079.

Related Changesets

bareos: master 52827c8b

2021-07-15 21:13

frank

Ported: N/A

Details Diff
webui: quote restore command parameters

Fixes 0001020: Can not restore a client with spaces in its name
Affected Issues
0001020
mod - webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php Diff File

bareos: bareos-18.2 20d0d352

2021-07-15 21:13

frank

Ported: N/A

Details Diff
webui: quote restore command parameters

Fixes 0001020: Can not restore a client with spaces in its name

(cherry picked from commit 52827c8b99db724d418736795f64f96af2b1c45a)
Affected Issues
0001020
mod - webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php Diff File

bareos: bareos-19.2 64692fd9

2021-07-15 21:13

frank

Ported: N/A

Details Diff
webui: quote restore command parameters

Fixes 0001020: Can not restore a client with spaces in its name

(cherry picked from commit 52827c8b99db724d418736795f64f96af2b1c45a)
Affected Issues
0001020
mod - webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php Diff File

bareos: bareos-19.2 a3873fec

2021-07-22 16:54

frank


Committer: GitHub

Ported: N/A

Details Diff
Merge pull request 0000895 from bareos/dev/fbergkemper/bareos-19.2/backport-971-1020

webui: backport to fix issue 0000971 and issue 0001020
Affected Issues
0000971, 0001020
mod - webui/module/Restore/src/Restore/Controller/RestoreController.php Diff File
mod - webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php Diff File

bareos: bareos-18.2 7fc53502

2021-07-22 16:55

frank


Committer: GitHub

Ported: N/A

Details Diff
Merge pull request 0000896 from bareos/dev/fbergkemper/bareos-18.2/backport-971-1020

webui: backport to fix issue 0000971 and issue 0001020
Affected Issues
0000971, 0001020
mod - webui/module/Restore/src/Restore/Controller/RestoreController.php Diff File
mod - webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php Diff File

Issue History

Date Modified Username Field Change
2018-10-10 09:37 linkstat New Issue
2018-10-10 09:37 linkstat File Added: Bareos - Can not restore when a client name has spaces in their name.jpg
2018-10-10 11:12 frank Status new => assigned
2018-10-10 11:12 frank Assigned To => frank
2019-07-31 18:03 linkstat Note Added: 0003546
2021-07-15 18:57 frank Status assigned => confirmed
2021-07-15 19:16 frank Summary Webui can not restore a client, if it contains spaces in its name => Can not restore a client with spaces in its name
2021-07-21 15:22 frank Changeset attached => bareos master 52827c8b
2021-07-21 15:22 frank Note Added: 0004185
2021-07-21 15:22 frank Status confirmed => resolved
2021-07-21 15:22 frank Resolution open => fixed
2021-07-22 15:22 frank Changeset attached => bareos bareos-18.2 7fc53502
2021-07-22 15:22 frank Changeset attached => bareos bareos-18.2 20d0d352
2021-07-22 15:22 frank Changeset attached => bareos bareos-19.2 a3873fec
2021-07-22 15:22 frank Changeset attached => bareos bareos-19.2 64692fd9
2021-07-22 15:22 frank Note Added: 0004188
2021-07-26 10:53 frank Relationship added related to 0000981
2021-09-13 10:37 arogge Relationship added related to 0001383
2021-09-14 10:54 arogge_adm Relationship added related to 0001384
2021-09-14 12:19 arogge_adm Relationship added related to 0001361
2021-12-21 13:56 arogge Relationship added related to 0001289