Re: Super slow authentication

2012-07-05 Thread Ali Mesdaq
Sorry your right I didn't even include some basic info. Basically I am
using django_auth_ldap.backend.LDAPBackend as my first authentication
backend and .ModelBackend as my secondary. I have a login page that needs
authentication before you can do anything useful in the views by using a
decorator on my view methods and redirecting to the login url. The one
thing I have noticed about this setup is that on my dev box which is 10.04
Ubuntu its not as slow as the centos 5 machine its running on however they
are both slow.

Thanks,
Ali Mesdaq
Security Researcher
Work:  +1(408) 321-7779  |  Fax:  +1 (408) 321-9818
Email:  ali.mes...@fireeye.com

Next Generation Threat Protection
http://www.FireEye.com <http://www.fireeye.com/>




On 7/4/12 8:53 AM, "Melvyn Sopacua" <m.r.sopa...@gmail.com> wrote:

>On 4-7-2012 1:57, Ali Mesdaq wrote:
>> Hey everyone,
>> 
>> I got a situation where I have SUPER slow authentication like approx
>>5min
>> to authenticate with both LDAP and default authentication mechanisms.
>
>LDAP authentication for what exactly? Django doesn't come with an
>LDAP-based authentication system.
>
>> So
>> my issue is two parts first is why and how is my authentication so slow?
>
>No clue. Connection timeouts are the like candidate but since you're not
>providing a whole of information to go on...
>
>> Second is now I am having some remote users timeout on their
>> authentication which was not happening before but is happening now.
>
>Again, authenticating against what?
>-- 
>Melvyn Sopacua
>
>
>-- 
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To post to this group, send email to django-users@googlegroups.com.
>To unsubscribe from this group, send email to
>django-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>


__
This email and any attachments thereto may contain private, confidential, 
and/or privileged material for the sole use of the intended recipient.  Any 
review, copying, or distribution of this email (or any attachments thereto) by 
others is strictly prohibited.  If you are not the intended recipient, please 
contact the sender immediately and permanently delete the original and any 
copies of this email and any attachments thereto.
__

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Super slow authentication

2012-07-03 Thread Ali Mesdaq
Hey everyone,

I got a situation where I have SUPER slow authentication like approx 5min
to authenticate with both LDAP and default authentication mechanisms. So
my issue is two parts first is why and how is my authentication so slow?
Second is now I am having some remote users timeout on their
authentication which was not happening before but is happening now. I have
not seen anything in the logs or error messages to help me track down the
cause of this issue. The system is centos 5 and is running apache + wsgi.
The django version is 1.3.

Thanks,
Ali Mesdaq
Security Researcher
Email:  ali.mes...@fireeye.com

Next Generation Threat Protection
http://www.FireEye.com <http://www.fireeye.com/>


__
This email and any attachments thereto may contain private, confidential, 
and/or privileged material for the sole use of the intended recipient.  Any 
review, copying, or distribution of this email (or any attachments thereto) by 
others is strictly prohibited.  If you are not the intended recipient, please 
contact the sender immediately and permanently delete the original and any 
copies of this email and any attachments thereto.
__

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Help - Which IDE is best to use.

2012-05-15 Thread Ali Mesdaq
You make a really good point about starting with Vim. I personally started
with Vim and used it exclusively for years and feel all developers need to
be at least proficient with it. But just as you should start with Vim you
probably also should move on once your intermediate to advanced in
development. To me going back to Vim from Komodo is like going back to the
stone age. Just as we are always looking for the best web technologies to
develop on that make our lives easier and solutions better we should also
do the same with our development environments.

Thanks,
Ali Mesdaq
Security Researcher
Work:  +1(408) 321-7779  |  Fax:  +1 (408) 321-9818
Email:  ali.mes...@fireeye.com

Next Generation Threat Protection
http://www.FireEye.com <http://www.fireeye.com/>


On 5/15/12 3:16 AM, "Karl Sutt" <k...@sutt.ee> wrote:

>
>
>
>I use Vim, for everything involving writing -- coding, producing
>papers/articles/reports, editing existing code and documents. It is not
>an IDE, but a text editor, and it is absolutely excellent. Once you learn
>Vim, you'll never want to use anything else (this
> is the case for me, at least). The learning curve is rather steep, but
>after you get used to the different modes, moving around and editing text
>efficiently, you start to see and appreciate the power of the keyboard.
>
>The downside is that it does not come with documentation built in, or the
>code-checking and all that fancy stuff, like the bigger counterparts
>(Eclipse, Aptana, pyCharm etc), but I personally don't need it.
>The upside is that you are not tied to a specific IDE for a specific
>language/framework. Vim lets you edit code and text efficiently,
>regardless of what language/framework/task you are working with.
>
>
>Obviously, my goal is not to say Vim (another example is GNU Emacs) is
>the best editor ever, but to let people know of tools that have been
>around since the beginning of first operating systems. They have been
>perfected over the past 20 years by professionals,
> people who wrote the very operating systems you use today.
>
>
>For a beginner programmer, my suggestion is to always start with the
>simplest tools possible, and not let one IDE do everything for you,
>without you understanding the process. The downside is that you'll have
>to put in a lot more effort to get going and
> you don't get the fancy add-ons. But the upside (in my opinion, anyway)
>is that you gain a deeper understanding of how these things fit together,
>giving you a better insight into whatever you're working on. Don't be
>afraid to get your hands dirty :-)
>
>
>Karl Sutt
>
>
>On Tue, May 15, 2012 at 10:51 AM, cougar cougar
><cougar2...@gmail.com> wrote:
>
>ulipad , free  and build with wxpython
>
>
>2012/5/14 Sanjay M <isanja...@gmail.com>
>
>I am new to Django, and I was confused in choosing a IDE between Eclipse
>and aptana studio 3 to edit source code. Kindly suggest me a good one.
>
>
>Thank you in advance,
>Regards,
>Sanjay M
>
>
>
>
>
>-- 
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To view this discussion on the web visit
>https://groups.google.com/d/msg/django-users/-/2LIdVrSuFpQJ
><https://groups.google.com/d/msg/django-users/-/2LIdVrSuFpQJ>.
>To post to this group, send email to
>django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
>To unsubscribe from this group, send email to
>django-users+unsubscr...@googlegroups.com
><mailto:django-users%2bunsubscr...@googlegroups.com>.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en
><http://groups.google.com/group/django-users?hl=en>.
>
>
>
>
>-- 
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To post to this group, send email to
>django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
>To unsubscribe from this group, send email to
>django-users+unsubscr...@googlegroups.com
><mailto:django-users%2bunsubscr...@googlegroups.com>.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en
><http://groups.google.com/group/django-users?hl=en>.
>
>
>
>
>
>
>
>
>-- 
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To post to this group, send email to django-users@googlegroups.com.
>To unsubscribe from this group, send email to
>django-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Help - Which IDE is best to use.

2012-05-14 Thread Ali Mesdaq
If you can pay for the full version Komodo has been working awesome for me
not only for Django but for almost any kind of development work.

Thanks,
Ali Mesdaq
Security Researcher
Work:  +1(408) 321-7779  |  Fax:  +1 (408) 321-9818
Email:  ali.mes...@fireeye.com

Next Generation Threat Protection
http://www.FireEye.com <http://www.fireeye.com/>



On 5/14/12 8:56 AM, "Sanjay M" <isanja...@gmail.com> wrote:

>
>
>
>I am new to Django, and I was confused in choosing a IDE between Eclipse
>and aptana studio 3 to edit source code. Kindly suggest me a good one.
>
>
>Thank you in advance,
>Regards,
>Sanjay M
>
>
>
>
>
>-- 
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To view this discussion on the web visit
>https://groups.google.com/d/msg/django-users/-/2LIdVrSuFpQJ
><https://groups.google.com/d/msg/django-users/-/2LIdVrSuFpQJ>.
>To post to this group, send email to django-users@googlegroups.com.
>To unsubscribe from this group, send email to
>django-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Questions about UnicodeDecodeError

2012-04-02 Thread Ali Mesdaq
I did have UTF-8 in the db before but then when I was inserting(done by a
script) values in I would get errors. I really want to avoid doing
conversions before I insert the data so I can maintain the data in the
exact format as it was seen in. I may be forced into doing that it seems
to make django even work. I tried to get my app to work by creating the
__unicode__ method return a string of "blah" and it still dies on me.

Thanks,
Ali Mesdaq
Security Researcher
Cell:  +1 (619) 952-8488  |  Fax:  +1 (408) 321-9818
Email:  ali.mes...@fireeye.com
 

Next Generation Threat Protection
http://www.FireEye.com <http://www.fireeye.com/>

 





On 4/1/12 3:04 PM, "Bill Freeman" <ke1g...@gmail.com> wrote:

>If you can, switch to UTF-8 in the db.  Web traffic can arrive in a
>variety of
>encodings, and while the headers tell the server how to make unicode out
>of it, but by having the db set for ASCII, you limit what you can store
>(since
>not all unicode characters can be converted to ASCII.
>
>On Fri, Mar 30, 2012 at 7:45 PM, Ali Mesdaq <ali.mes...@fireeye.com>
>wrote:
>> I have a situation where I am reading data that I have no control over
>>and
>> inserting it into a db. The data is http headers. I am storing them in
>> postgres db in a text field and the db encoding is SQL_ASCII. Since the
>> data can be anything even non compliant http headers with anything for
>>its
>> values I don't want to modify the data before I store it in the db.
>> However this is causing issues with certain values causing the
>> UnicodeDecodeError. For example I have a specific case where the user
>> agent is set to 'KC\xd4\xda\xcf\xdf\xc9\xfd\xbc\xb6'. I have been trying
>> to look for a way to deal with these cases gracefully in the models
>> __unicode__ method but nothing I have tried has worked.
>>
>> Thanks,
>> Ali Mesdaq
>> Security Researcher
>> Cell:  +1 (619) 952-8488  |  Fax:  +1 (408) 321-9818
>> Email:  ali.mes...@fireeye.com
>>
>>
>> Next Generation Threat Protection
>> http://www.FireEye.com <http://www.fireeye.com/>
>>
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>>Groups "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>>django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>>http://groups.google.com/group/django-users?hl=en.
>>
>
>-- 
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To post to this group, send email to django-users@googlegroups.com.
>To unsubscribe from this group, send email to
>django-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Questions about UnicodeDecodeError

2012-03-30 Thread Ali Mesdaq
I have a situation where I am reading data that I have no control over and
inserting it into a db. The data is http headers. I am storing them in
postgres db in a text field and the db encoding is SQL_ASCII. Since the
data can be anything even non compliant http headers with anything for its
values I don't want to modify the data before I store it in the db.
However this is causing issues with certain values causing the
UnicodeDecodeError. For example I have a specific case where the user
agent is set to 'KC\xd4\xda\xcf\xdf\xc9\xfd\xbc\xb6'. I have been trying
to look for a way to deal with these cases gracefully in the models
__unicode__ method but nothing I have tried has worked.

Thanks,
Ali Mesdaq
Security Researcher
Cell:  +1 (619) 952-8488  |  Fax:  +1 (408) 321-9818
Email:  ali.mes...@fireeye.com
 

Next Generation Threat Protection
http://www.FireEye.com <http://www.fireeye.com/>

 



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.