Ronnie Beltran | 29 Jan 05:09
Picon
Gravatar

CherryPy Facebook Oauth 2.0 on Google Appengine

I'm trying to port a sample facebook oauth 2.0 auth from webapp to
cherrypy. however it always return a None value in self.current_user.
I think I'm having trouble with settings cookies here. any
corrections? see http://errorpaste.appspot.com/logs/4001/cherrypy-facebook-authentication-on-google-appengine
for more deatils.

--

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

Ronnie Beltran | 7 Feb 03:22
Picon
Gravatar

CherryPy Facebook Authentication on Google Appengine

Hi I asked this question
http://stackoverflow.com/questions/9045244/cherrypy-facebook-authentication-on-google-appengine
at SO but no answer yet. Can somebody here help?

--

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

Scott Chapman | 29 Jan 03:00

cgitb wierdness with CP

Every time I get a database error, I get a traceback from cgitb.
Here's my basic setup:

import cherrypy
import cgitb, sys

def cgitb_display_err():
    """Replace the default error response with an HTML traceback from
cgitb."""

    tb = cgitb.html(sys.exc_info())
    def set_tb():
        cherrypy.response.body = tb
        cherrypy.response.headers['Content-Length'] = None
    cherrypy.request.hooks.attach('after_error_response', set_tb)

def cgitb_log_err():
    """Log cgitb details to the log."""
    tb = cgitb.text(sys.exc_info())
    def set_tb():
        cherrypy.log(tb)
    cherrypy.request.hooks.attach('after_error_response', set_tb)

part of cp_config:
            'tools.cgitb_display_err.on': False,
            'tools.log_tracebacks.on': False,
            'tools.cgitb_log_err.on': True,

cherrypy.tools.cgitb_display_err =
cherrypy.Tool('before_error_response', cgitb_display_err)
(Continue reading)

T. S. Ferreira | 25 Jan 13:56
Picon
Gravatar

Example of CP 3.2.2 behind Apache 2

I am looking for a good example of a CP 3.2.2 server running behind
Apache 2.  Any suggestions?

-- tsf

--

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

T. S. Ferreira | 24 Jan 16:53
Picon
Gravatar

CherryPy 3.2.2: No module named Cookie

I installed Python 3.2.2 and CherryPy 3.2.2 on my Linux machine
(Ubuntu 10.04.3).  When I try to "import cherrypy" I get the output

Traceback (most recent call last):
 File "/usr/local/lib/python3.2/site-packages/cherrypy/_cpcompat.py",
line 203, in <module>
   from Cookie import SimpleCookie, CookieError
ImportError: No module named Cookie

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/local/lib/python3.2/site-packages/cherrypy/__init__.py",
line 62, in <module>
   from cherrypy._cpcompat import urljoin as _urljoin, urlencode as _urlencode
 File "/usr/local/lib/python3.2/site-packages/cherrypy/_cpcompat.py",
line 209, in <module>
   from http.client import BadStatusLine, HTTPConnection,
HTTPSConnection, IncompleteRead, NotConnected
ImportError: cannot import name HTTPSConnection

Some sites suggest that I should install libssl-dev, which I did but
it did not help.

I found that there is a module
/usr/local/lib/python3.2/http/cookies.py (lower case, plural!) which
provides classes "SimpleCookie" and "CookieError".

Any suggestions?
(Continue reading)

Anders Langworthy | 13 Jan 04:57
Picon

stable/dev docs

Probably something that hasn't been fixed since the site transition, but
the links for the "stable version" and "bleeding-edge development
version" on the docs site [0] just point to copies of the 3.2.0 docs.

[0] http://docs.cherrypy.org/

--

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

Laurent | 13 Jan 03:34
Picon

HTTP-Only cookies reminder

I just discovered that since last summer HTTP-Only cookies are available in Cherrypy.

I personally use a custom session tool that use a session_id client-side. This session_id can easily be read by some javascript code, thus stolen with html/javascript code injection.
So if you want to prevent your session cookies to be read by a malicious client-side script you have to use HTTP-Only cookies: these kind of cookies can only be read by the server, not by the client (most browsers support that feature now). 
To use HTTP-Only cookies with Cherrypy sessions just add the following line in your configuration file:
tools.sessions.httponly = True
If you use SLL you can also make your cookies secure (encrypted) to avoid "man in the middle" cookies reading with:
tools.sessions.secure = True

You might already knew this stuff but in case you didn't I guess it was worth mentioning, as these lines never appear in documentation examples.

Laurent.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cherrypy-users/-/eFTPEawT1_EJ.
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to cherrypy-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en.
DJW | 8 Jan 06:28
Picon

Intrathread/process pubsub?

I've been reading up on CherryPy's wspbus but couldn't find a concrete
answer for a problem I'm trying to solve.

Rough outline is that I am writing a on-demand javascript coverage
utility.  I overrode the stock staticdir tool to accomplish this, but
now I wanted to implement a simple filter to decide where to serve the
real JS resource or an instrumented version.

The crux of it is that in my version of staticdir I would need to send
a query over the bus to a central control subscriber which would
return True/False Process/Pass-thru.  Is something like this possible
with wspbus or should I look to use an external message queue service.

--

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

Rahul | 5 Jan 20:33
Picon
Favicon

Python Weekly

Hi All,

I run a free weekly newsletter called Python Weekly, which features
curated news, articles, new releases, software and tools, events, jobs
etc related to Python. I thought that some of you would be interested
in it. Here is a link to the website, http://www.pythonweekly.com/

Regards
Rahul

--

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

Cliff | 5 Jan 16:47
Picon
Gravatar

how to access WSGIGateway.write() method from application level?

Is there a way to reference WSGIGateway's write() method? In older
version of Cherrypy, it was possible to do this through
cpg.response.wfile.

Basically I would like to do streaming of large files. Although it's
doable by returning a generator to the exposed method at the
application level, it will be hard to convert my existing code into a
generator. My existing code takes a file/StringIO type of object, and
calls the write() method on it directly. In this case, I am assuming
the WSGIGateway object is the equivalence.

--

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

Miki | 29 Dec 19:18
Picon
Gravatar

Suppressing logging of a URL

Greetings,


CherryPy by default logs access to every URL. However I'd like to suppress this logging for one specific URL which is being hit many times.
Is there a way to do that (in the _cp_config of the handler method somehow?)

Thanks,
--
Miki

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cherrypy-users/-/z4869wqDmb4J.
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to cherrypy-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en.

Gmane