[Labs-l] Conversion issues

John phoenixoverride at gmail.com
Mon Sep 2 00:44:48 UTC 2013


PS we even have issues between webservers, only about 1 in 3 requests using
/usr/bin/whois actually works (Im just reloading the page each time) the
rest result in getting nothing from the whois query.


On Sun, Sep 1, 2013 at 8:18 PM, John <phoenixoverride at gmail.com> wrote:

> Why are the variables different on different servers? this is just begging
> to cause headaches. Can we please stop murdering poor kittens and ensure
> things are uniform between the servers? See
> http://commons.wikimedia.org/wiki/File:Server-kitty.jpg
>
>
> On Sun, Sep 1, 2013 at 8:14 PM, Marc A. Pelletier <marc at uberbox.org>wrote:
>
>> On 09/01/2013 04:08 PM, John wrote:
>> > result = popen(u'whois -h whois.cymru.com <http://whois.cymru.com> " -v
>> > -f %s"' % IP).read()
>> > should give the whois results however I am getting a zero size response
>> > when run from the web, however when ran from term it works fine......
>>
>> You are relying on the PATH variable for your executable which is, IIRC,
>> set to only /bin by apache.  Invoking /usr/bin/whois explicitly will
>> remove that dependency and be considerably more secure to boot (there is
>> no risk that a path be injected into your script and make it execute the
>> wrong binary).
>>
>> -- Marc
>>
>>
>> _______________________________________________
>> Labs-l mailing list
>> Labs-l at lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/labs-l
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/labs-l/attachments/20130901/47fdcbe9/attachment-0001.html>


More information about the Labs-l mailing list