bug report - quote parameters send to plugins
bug report - quote parameters send to plugins
От:
Francisco Puga <fpuga@cartolab.es>
Дата:
hi,
I'm new to the list, so sorry if i do something wrong.
I'm testing QgsPostGIS-Viewer [1] (trunk version) with pgAdmin 1.10.5
and PostgreSQL 8.3
My user password has a whitespace in it, something like '1111 1111'. I
think that the parameters send to the plugins are not quoted so the
plugin can get the correct information.
I try to debug using this code,
app = SingletonApp( argv )
dictOpts = { '-h':'', '-p':'5432', '-U':'', '-W':'', '-d':'', '-s':'public', '-t':'', '-g':'', 'type':'unknown',
'srid':'' }
print >> sys.stderr, argv
opts, args = getopt.getopt( sys.argv[1:], 'h:p:U:W:d:s:t:g:', [] )
print >> sys.stderr, argsprint >> sys.stderr, opts
And the output is:
['/home/shared/development/varios/QgsPostGIS-Viewer/postgis_viewer.py',
'-h', '127.0.0.1', '-p', '5432', '-U', 'postgres', '-W', '1111',
'1111', '-d', mybd', '-s', 'myschema', '-t', 'mytable']
['1111', '-d', 'mybd', '-s', 'myschema', '-t', 'mytable']
[('-h', '127.0.0.1'), ('-p', '5432'), ('-U', 'postgres'), ('-W', '1111')]
regards,
[1] https://github.com/imincik/QgsPostGIS-Viewer
--
Francisco Puga
Grupo de Desarrollo
Cartolab - Laboratorio de Ingeniería Cartográfica.
http://www.cartolab.es
ETS Ingeniería de Caminos, Canales y Puertos
Universidade da Coruña
Campus de Elviña - 15071 A Coruña (España)
(34)981167000 ext. 5493
Re: bug report - quote parameters send to plugins
От:
Guillaume Lelarge <guillaume@lelarge.info>
Дата:
Hi, On 04/18/2011 06:46 PM, Francisco Puga wrote: > [...] > I'm new to the list, so sorry if i do something wrong. > > I'm testing QgsPostGIS-Viewer [1] (trunk version) with pgAdmin 1.10.5 > and PostgreSQL 8.3 > > My user password has a whitespace in it, something like '1111 1111'. I > think that the parameters send to the plugins are not quoted so the > plugin can get the correct information. > You're right. pgAdmin doesn't add quotes to parameters. It probably could do it, but you can already have this by changing the command of your plugin. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com