Bug 5121 - Opening up and saving "xterm" profile in Web Admin Gui corrupts profiles.hconf
Summary: Opening up and saving "xterm" profile in Web Admin Gui corrupts profiles.hconf
Status: CLOSED DUPLICATE of bug 5017
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Administration (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Critical
Target Milestone: 4.2.0
Assignee: Peter Åstrand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-05 16:16 CEST by Peter Åstrand
Modified: 2014-05-09 14:10 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2014-05-05 16:16:15 CEST
If you open up the Terminal profile ("xterm") in the Web Admin Gui, and then just clicks save, the profiles.hconf is corrupted. Here's a diff:

 [/profiles/xterm]
+description_from_testcmd=false
+xdg_session=
 name=Terminal
 name[de]=Terminal
 name[es]=Terminal
@@ -282,7 +284,8 @@
 description=A bare bone environment with just a single graphical terminal started. Only meant to be used for debugging and testing.
 description[de]=Eine Minimalumgebung mit lediglich einem graphischen Terminal. Nur für Test- und Debugzwecke gedacht.
 description[es]=Un sistema mínimo con sólo un terminal gráfico arrancado. Diseñado para ser utilizado únicamente para tracear y probar.
-description[it]=È stato avviato un ambiente bare bone con un solo terminale grafico.\nL'utilizzo è previsto solo per debugging e test.
+description[it]=È stato avviato un ambiente bare bone con un solo terminale grafico.
+L'utilizzo è previsto solo per debugging e test.

What is not visible here is that the \n has been replaced by a Windows style line break (\r\n). After this, neither the Web Admin Gui nor the profile chooser can be used. 

One can also wonder why description_from_testcmd and xdg_session is added. Either avoid this, or let them be included in the shipped profiles.hconf.
Comment 1 Peter Åstrand cendio 2014-05-06 08:54:41 CEST
(In reply to comment #0)
> If you open up the Terminal profile ("xterm") in the Web Admin Gui, and then
> just clicks save, the profiles.hconf is corrupted. Here's a diff:
> 
>  [/profiles/xterm]
> +description_from_testcmd=false
> +xdg_session=

This problem has been fixed in 28938. Verified that all parameters are included with this command:

$ for varname in `cat profiles.hconf.in | grep -v '^\[' | grep -v ^# | cut -d= -f 1 | sort | uniq`; do echo -n $varname " "; grep ^${varname} profiles.hconf.in | wc -l; done
cmdline  10
default  1
description  20
description_from_testcmd  10
greeting  1
icon  10
introduction  1
name  10
order  1
screenshot  10
show_intro  1
testcmd  10
xdg_session  10
Comment 2 Peter Åstrand cendio 2014-05-06 11:14:54 CEST
(In reply to comment #0)

> -description[it]=È stato avviato un ambiente bare bone con un solo terminale
> grafico.\nL'utilizzo è previsto solo per debugging e test.
> +description[it]=È stato avviato un ambiente bare bone con un solo terminale
> grafico.
> +L'utilizzo è previsto solo per debugging e test.
> 
> What is not visible here is that the \n has been replaced by a Windows style
> line break (\r\n). After this, neither the Web Admin Gui nor the profile
> chooser can be used. 

The problem is actually worse: The corruption happens also if you simply include a line break in any Description input text field.
Comment 3 Peter Åstrand cendio 2014-05-06 11:29:16 CEST
(In reply to comment #2)
> (In reply to comment #0)
> 
> > -description[it]=È stato avviato un ambiente bare bone con un solo terminale
> > grafico.\nL'utilizzo è previsto solo per debugging e test.
> > +description[it]=È stato avviato un ambiente bare bone con un solo terminale
> > grafico.
> > +L'utilizzo è previsto solo per debugging e test.
> > 
> > What is not visible here is that the \n has been replaced by a Windows style
> > line break (\r\n). After this, neither the Web Admin Gui nor the profile
> > chooser can be used. 
> 
> The problem is actually worse: The corruption happens also if you simply
> include a line break in any Description input text field.

Moved to bug 5123. For this release, we will just fix the Italian translation. Fixed in 28939.
Comment 4 Karl Mikaelsson cendio 2014-05-09 14:09:59 CEST
If this bug distills down to a problem with the italian translation, then this is a duplicate of bug 5017.

*** This bug has been marked as a duplicate of bug 5017 ***

Note You need to log in before you can comment on or make changes to this bug.