savannah-hackers-public
[Top][All Lists]
Advanced

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

Re: [Savannah-hackers-public] On resetting passwords


From: Assaf Gordon
Subject: Re: [Savannah-hackers-public] On resetting passwords
Date: Fri, 10 Mar 2017 15:59:40 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello Ineiev,

Sorry for late response.

I like the feature idea, but I would humbly
suggest the following before installing:

1.
not passing user/pw for database from the PHP to the PERL script
as command-line arguments.
Bob re-wrote 'sv_get_authorized_keys' in Perl
with example of how to access the config file with the DB passwords,
see vcs0:/root/bin/sv_get_authorized_keys .

2.
not including hard-coded paths in the PHP code.
Based on our recent migration efforts, this is bound to cause troubles
later.

3.
It would be good to add a lot more input validation and error checking in the perl script.
Again based on our recent efforts, chasing obscure errors
in nginx's log from scripts executed by the PHP frontend is not fun.

4.
I'm a bit wary of executing gpg in this way based on un-sanitized user
input. Basically, the script takes whatever the user uploaded as his
GPG key and pipes it into GPG.
This sounds like inviting problems.

5.
The 'open' command should escape/sanitize the parameters before
executing them as shell commands (e.g. the "$key_id" which is
set by the user who uploads the GPG key, but could be others
that I've missed).

6.
There seems to be an implicit requirement that the uploaded
key be able to encrypt (based on the comment "Get the first ID of a
public key with encryption capability.").
To be user-friendly, this requires proper error checking and
reporting if no such key is found.
Otherwise we're just inviting lots of support calls from confused users.


Lastly,
If you'd like to have a dedicated development environment for you
(e.g. 'https://ineiev.frontend0.sv.gnu.org') where you can
experiment with new features, let me know and I'll be happy to
set it up.

regards,
- assaf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]