Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Dave S
On Wednesday, February 28, 2018 at 3:50:16 PM UTC-8, Anthony wrote: > > I think you're on the right track. If you need the original request body > to verify the signature, request.body.read() should do it. Does that not > work? > > Also, I don't think you need the decorator and nested

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Anthony
I think you're on the right track. If you need the original request body to verify the signature, request.body.read() should do it. Does that not work? Also, I don't think you need the decorator and nested function. Just write a simple function and call it at the beginning of the handler: def

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Manuele Pesenti
Il 28/02/18 17:10, Anthony ha scritto: > You could parse the request body yourself, but web2py will do it > automatically and put the variables in request.post_vars (if JSON is > posted, its keys will become the keys of request.post_vars). > > I'm not sure what you mean by "check the

Re: [web2py] Error using Postgres

2018-02-28 Thread Ovidio Marinho
PROBLEM SOLVED [image: http://itjp.net.br] http://itjp.net.b r *Ovidio Marinho Falcao Neto* ovidio...@gmail.com Brasil 2018-02-28 8:02 GMT-03:00 Morganti

Re: [web2py] Re: compiling application ?

2018-02-28 Thread Yoel Benítez Fonseca
Thanks Anthony, On Wed, Feb 28, 2018 at 10:04 AM, Anthony wrote: On Tuesday, February 27, 2018 at 6:26:10 PM UTC-5, Yoel Benitez Fonseca wrote: Is there a way of compiling a web2py application from the command line ? I don't think via the web2py command line, but it can

[web2py] Re: Double left join syntax

2018-02-28 Thread Anthony
> > SELECT * > FROM > OnResource > LEFT JOIN Contact Owner ON Owner.id = OnResource.Contact > LEFT JOIN Contact Proxy ON Proxy.id = OnResource.Proxy > ORDER BY > Owner.LastName, Owner.FirstName > > I tried this DAL select syntax > > timesheet_owners = db().select(db.OnResource.ALL,

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Anthony
> > > It looks like WooCommerce makes a POST request, so the values posted > > should end up in request.post_vars. > > maybe I don't understand... what I think I need to check is the raw body > of the request... isn't it? How should I check the request.post_vars? > Isn't it a dictionary or a

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Manuele Pesenti
Thank Antony, On 28/02/2018 15:50, Anthony wrote: The webhook request headers will be in request.env.http_x_wc_webhook_[specific header] (e.g., request.env.http_x_wc_webhook_signature). ok got it! It looks like WooCommerce makes a POST request, so the values posted should end up in

Re: [web2py] Re: please help us test trunk web2py

2018-02-28 Thread Richard Vézina
Here the issue and a PR : https://github.com/web2py/pydal/pull/523 Please including it in the next release if it don't break anything... It will help with backward (empty query) compatibility... Thanks Richard On Tue, Feb 27, 2018 at 5:37 PM, Richard Vézina

[web2py] Re: compiling application ?

2018-02-28 Thread Anthony
On Tuesday, February 27, 2018 at 6:26:10 PM UTC-5, Yoel Benitez Fonseca wrote: > > Is there a way of compiling a web2py application from the command line ? > I don't think via the web2py command line, but it can be done programmatically via app_compile in gluon.admin or more directly via

[web2py] Re: Double left join syntax

2018-02-28 Thread Richard
Here some progress : https://github.com/web2py/pydal/issues/521 Le mercredi 8 avril 2015 08:40:26 UTC-4, Lieven Van Acker a écrit : > > > Hello all, > > > I'm trying to perform a double left join, but can't seem to figure out the > right syntax. Maybe someone could shed some light... > > > This

Re: [web2py] Re: pyDAL - Spurious "cross join"

2018-02-28 Thread Richard Vézina
Here some progress : https://github.com/web2py/pydal/issues/521 On Fri, Aug 4, 2017 at 12:57 PM, villas wrote: > With a where clause, it works OK. > However, in my example, I still should not have generated a CROSS JOIN. > I guess it's just a pyDAL issue. > > > > > On

[web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Anthony
The webhook request headers will be in request.env.http_x_wc_webhook_[specific header] (e.g., request.env.http_x_wc_webhook_signature). It looks like WooCommerce makes a POST request, so the values posted should end up in request.post_vars. As an aside, you can probably simplify your code to

Re: [web2py] Error using Postgres

2018-02-28 Thread Morganti
Hi, The last command before the error in line 54 'for row in rows:' is a selection using 'iterselect'. I changed the 'iterselect' to 'select' and no more errors. Thanks Massimo, Ovidio and Daves. Best regards André Em terça-feira, 27 de fevereiro de 2018 12:29:16 UTC-3, Morganti escreveu: >

[web2py] How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Manuele Pesenti
Hi! I need to develop a web service that listen to webhook calls from a woocommerce site, I thought to write a little check class to pass to auth.requires decorator like the following: class HookCheck(object):     secret = ''     def __init__(self):     super(HookCheck,