Package: x2goplugin
Version: 3.99.2.1-1
Severity: important

The X2Go Plugin gets its session configuration via a html file:

"""
  <body onload="checkPlugin()">
    <div id="x2goplugin">
    <object
        src="location"
        type="application/x2go"
        name="x2goplugin"
        palette="background"
        height="100%"
        hspace="0"
        vspace="0"
        width="100%"
        x2goconfig="
session=X2Go-Demo-Session
server=localhost
user=
sshport=22
command=XFCE
rootless=false
sound=true
exportfs=true
speed=adsl
compression=16m-jpeg
quality=9
dpi=120
kbdlayout=
kbdtype=auto
showtoolbar=true
showstatusbar=true
usekbd=true
soundsystem=pulse
soundtunnel=true
defsndport=true
print=true
rootless=false
published=false
applications=WWWBROWSER, MAILCLIENT, OFFICE, TERMINAL
">
    </object>

    </div>
  </body>
"""

The parsing of session options fails if a session profile option is preceeded by whitespaces.

Like:

    <object
        src="location"
        type="application/x2go"
        name="x2goplugin"
        palette="background"
        height="100%"
        hspace="0"
        vspace="0"
        width="100%"
        x2goconfig="
            session=X2Go-Demo-Session
            server=localhost
            user=
            sshport=22
            command=XFCE
            rootless=false
            sound=true
            exportfs=true
            speed=adsl
            compression=16m-jpeg
            quality=9
            dpi=120
            kbdlayout=
            kbdtype=auto
            showtoolbar=true
            showstatusbar=true
            usekbd=true
            soundsystem=pulse
            soundtunnel=true
            defsndport=true
            print=true
            rootless=false
            published=false
            applications=WWWBROWSER, MAILCLIENT, OFFICE, TERMINAL">
    </object>

The patch below adds the requested whitespace tolerance:

+--- a/onmainwindow.cpp
++++ b/onmainwindow.cpp
@@ -9364,6 +9369,11 @@
     for ( int i=0;i<lines.count();++i )
     {
         QString line = lines[i];
+
+ // strip left/right whitespaces, important for plugin settings via x2goconfig
+        line.remove(QRegExp("^\\s+"));
+        line.remove(QRegExp("\\s+$"));
+
         if ( ( line=="-----BEGIN DSA PRIVATE KEY-----" ) ||
                 ( line=="-----BEGIN RSA PRIVATE KEY-----" ) )
         {

Greets,
Mike


--

DAS-NETZWERKTEAM
mike gabriel, rothenstein 5, 24214 neudorf-bornstein
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb

Attachment: pgpxT9iiCzkGg.pgp
Description: Digitale PGP-Unterschrift

Reply via email to