Re: [PATCH] osinfo-install-script: read config values as strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 17, 2014 at 05:00:16PM +0100, Giuseppe Scrivano wrote:
> Christophe Fergeau <cfergeau@xxxxxxxxxx> writes:
> 
> >> Solves this problem:
> >> 
> >> $ osinfo-install-script rhel6.5 -c "admin-password=a&b"
> >> error : unterminated entity reference               b
> >
> >
> > Shouldn't we be XML-escaping user-input instead (
> > xmlEncodeEntitiesReentrant() ) ?
> 
> the same would happen, for example, if the password is generated
> randomly.  If you try enough times the same command without the
> '-c "admin-password=a&b"' part, you will hit the same problem at some
> point.  I think it is safer to fix it at this level.

My initial thought was to fix this when this string is set on the
OsinfoInstallScriptConfig object, but there is no special code handling this parameter
in osinfo-install-script nor in OsinfoInstallScriptConfig, just generic
code setting an entity param, so this patch is probably the only place
where we can solve this.

However, I'm not familiar enough with the implications of using
this 'raw' node API to feel comfortable ACKing this :-/

Christophe

Attachment: pgpnnsGjfgxO_.pgp
Description: PGP signature

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux