Bug #3311

Backup data fails if a field contains \ character at the end

Added by Alessio Fattorini over 5 years ago. Updated over 5 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-backup-data
Target version:v6.7
Security class: Resolution:
Affected version:v6.7 NEEDINFO:No

Description

Adding the character \ at the end of a field the backup will fail and the key backup-data inside the configuration backup will be broken.

For example, filling this data into the SMBshare field

SMBShare=.\Backup\Centralino\

After the signal event we obtain:

[root@botolo ~]# config show backup-data
backup-data=configuration
Odd number of elements in hash assignment at /usr/share/perl5/vendor_perl/esmith/db.pm line 273.
    =notifyTo
    250=notify
    BackupTime=1:00
    CleanupOlderThan=never
    FullDay=0
    LogFile=/var/log/last-backup.log
    Mount=/mnt/backup
    NFSHost=
    NFSShare=
    Program=duplicity
    SMBHost=alessio
    SMBLogin=pippo1
    SMBPassword=pippo
    SMBShare=.\Backup\Centralino\|Type
    cifs=VolSize
Use of uninitialized value $properties{"enabled"} in concatenation (.) or string at /usr/share/perl5/vendor_perl/esmith/db.pm line 401.
    enabled=
    error=notifyFrom
    incremental=USBLabel
    root@localhost=status

Associated revisions

Revision dfbc71e9
Added by Giacomo Sanchietti over 5 years ago

Web UI: add validator for backslash. Refs #3311

History

#1 Updated by Giacomo Sanchietti over 5 years ago

  • Category set to nethserver-backup-data
  • Status changed from NEW to TRIAGED
  • Target version set to v6.7
  • % Done changed from 0 to 20
  • Affected version set to v6.7

Bug is confirmed.

Add a new validator to check if the last character is a backslash.

#2 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#3 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#4 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-backup-data-1.1.7-1.1.gdfbc71e.ns6.noarch.rpm
Test case
  • Check the bug is not reproducible

#5 Updated by Davide Principi over 5 years ago

  • Assignee set to Davide Principi

#6 Updated by Davide Principi over 5 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 90

VERIFIED

NOTE
update to nethserver-backup-data-1.1.7-1.1.gdfbc71e.ns6.noarch fixes the problem on that field, but we should fix the basic esmith DB library to avoid the DB corruption.

#7 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-updates:
  • nethserver-backup-data-1.1.8-1.ns6.noarch.rpm

Also available in: Atom PDF