Laurent Bachelier
083caf15e5
browser2: Fix call to wrong method name
2014-03-10 13:11:07 +01:00
Laurent Bachelier
e793fd14da
browser2: Use cookie testing services
...
Both are aimed at real browsers.
This also adds a "real-life" cookie deletion/expiration test.
2014-03-10 13:11:07 +01:00
Laurent Bachelier
26025d725d
browser2: Document why all this for handling cookies
2014-03-10 13:11:07 +01:00
Laurent Bachelier
ef379f830e
browser2: Fix cookie security in redirections
...
With tests (another reason why it's good to write them).
2014-03-10 13:11:07 +01:00
Laurent Bachelier
83e08c103d
browser2: Add easy cookie building
2014-03-10 13:11:07 +01:00
Laurent Bachelier
ec64a52643
browser2: Misc doc/refactor
2014-03-10 13:11:06 +01:00
Laurent Bachelier
baef03c198
browser2: Test cookie override
2014-03-10 13:11:06 +01:00
Laurent Bachelier
2d70d11822
browser2: Handle cookies in the request/response cycle
...
Unlike the one by python-requests, it is secure, and generally behaves
like a real browser.
Basic test added.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
57e16e9fe4
browser2: Handle redirects internally
...
python-requests isn't secure enough, and some behavior depends on the
latest version.
Tested on 0.10.6.
So instead of the previous hack, we have some copy-paste.
But we gain secure cookies handling (not there yet),
referrer handling, "proper" redirect on POST behavior.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
4b802f32dd
browser2: Evolve _fix_redirect for latest python-requests
...
See commits:
e831947be43bc97b39d6e6e573cb0842b67fea80
dacc1d8aafedf80f8736d794005b6c8e8b1d4ad1
b20d171c1c11ecee83b7e4a0beead1e54902d37b
The entire redirect thingy will have to be overriden anyway, as it is
still broken. Cookies are given domain to domain without any checks.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
db304b955c
browser2: Handle cookie expiration, session cookies
...
Every related method accepts a "now" parameter. If provided, it will be
used instead of the system time.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
f17e61d73f
browser2: PostBin is now disabled
...
But RequestBin can't help test the bug.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
295e07b3ed
browser2: Add CookieJar and related cookie handling
...
Not used by Browser for now, but with very detailed tests.
Does not handle expirations yet.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
cd9b9300bd
browser2: Import package "cookies"
...
I certainly don't like doing this, but:
* It is the only cookie lib that does not completely suck.
* It handles multiple cookies in a line, parses flags correctly.
* Clean API
* "One file, so you can just drop cookies.py into your project if you like"
* MIT license
Despite being the best cookie lib available, it isn't well-packaged.
And since for now some light monkeypatching is done, it is even more
interesting to import it.
http://pypi.python.org/pypi/cookies
2014-03-10 13:11:06 +01:00
Laurent Bachelier
538c0ee92b
browser2: Handle Referrer, more documentation
2014-03-10 13:11:06 +01:00
Laurent Bachelier
d2c4085508
browser2: More tests
2014-03-10 13:11:06 +01:00
Laurent Bachelier
42b5eeeb77
browser2: Try to have extensive documentation
2014-03-10 13:11:06 +01:00
Laurent Bachelier
240abaf412
browser2: Better redirection fix
...
We have to redo request building for all redirection codes even if we
don't fix them, for consistency.
And only 302 seems to be problematic.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
92073a2cf1
browser2: Better tests
...
Allow using local services, add RequestBin support.
Still using PostBin for the empty POST issue.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
b70d722c03
browser2: Add support for relative URLs / BASEURL
2014-03-10 13:11:06 +01:00
Laurent Bachelier
60d1d03c1c
browser2: Handle server issues of postbin.org
...
And move tests outside.
2014-03-10 13:11:06 +01:00
Laurent Bachelier
72cbc5bd8b
browser2: Add a default timeout
...
Because no timeout is pretty dangerous
2014-03-10 13:11:06 +01:00
Laurent Bachelier
a1b7232521
browser2: Browser load urls, post, track state
...
With working tests!
2014-03-10 13:11:06 +01:00
Bezleputh
95ca604472
convert string to unicode to avoid warning message
2014-02-26 20:12:00 +01:00
Vincent Paredes
158efcded0
adding ChaoticDateGuesser when you know an interval
2014-02-26 18:37:52 +01:00
Bezleputh
11efe2d85d
add **kwargs to manage extra args in xpath and cssselect
2014-02-24 20:09:28 +01:00
Bezleputh
5ea0307b6a
add an xml parser
2014-02-24 20:07:49 +01:00
Romain Bignon
8955815805
better display to prompt user passwords
2014-02-24 14:55:06 +01:00
Florent
c2466f5018
Do not name the exception
...
pyflakes was complaining about a unused variable
2014-02-20 16:13:31 +01:00
Vincent A
2c3922ed2c
new image paste module: imgur
2014-02-19 22:14:23 +01:00
Romain Bignon
2147c4b363
unify no_login and nologin
2014-02-16 19:49:08 +01:00
Romain Bignon
44da8924bf
use name of module, not of backend
2014-02-09 19:09:39 +01:00
Florent
562062ac85
Display backend@issues.weboob.org and not backend.EMAIL
2014-02-09 14:32:31 +01:00
Romain Bignon
d9e33e50b8
strip password command output and take only the first line
2014-02-07 17:09:45 +01:00
Bezleputh
c6a9abcc7e
[repl] Optimization: do not fetch the collections when not needed
2014-02-06 11:30:15 +01:00
Vincent Paredes
56310adcad
fixing password encoding issue
...
Signed-off-by: Romain Bignon <romain@budget-insight.com>
2014-02-05 18:22:48 +01:00
Romain Bignon
829ecf8305
fix: masked parameter wasn't considered
2014-01-31 17:13:58 +01:00
Romain Bignon
536bc13347
catch ^C on global bcall errors handler
2014-01-31 17:13:58 +01:00
Romain Bignon
43022f434a
cleaned fix
2014-01-26 15:32:37 +01:00
Romain Bignon
478e85a2d8
better detection of editor used
2014-01-26 14:59:00 +01:00
Romain Bignon
b36daee5b1
prompt (beautifully) user during configuration of a backend
2014-01-24 00:39:43 +01:00
Romain Bignon
4dd2bbfb7b
if value is a command, do not validate conditions
2014-01-23 23:36:32 +01:00
Florent
0e93b9ba38
Move the call to external command in Value.load
2014-01-23 23:36:32 +01:00
Pierre Mazière
987dd2ee1d
more verbose report of an external command failure
...
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2014-01-23 23:36:32 +01:00
Pierre Mazière
c3a704be67
support for password retrieval from any cli tools
...
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2014-01-23 09:18:42 +01:00
Romain Bignon
2b0d4e8b91
create/edit tickets in a text editor
2014-01-22 00:00:43 +01:00
Florent
20917a1efe
Better formatting of version number in debug
...
Thanks to Romain
2014-01-20 14:44:02 +01:00
Florent
8ed0c7f87c
Add version information in Debug
2014-01-20 11:26:11 +01:00
Romain Bignon
d2b9a0a2d2
move obj_to_filename() into ReplApplication and use it in weboorrents
2014-01-16 23:56:42 +01:00
Pierre Mazière
7c5e21038b
fix #1325 : exclude backends that do not implement the required method
...
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2014-01-13 19:25:47 +01:00