Commit graph

63 commits

Author SHA1 Message Date
Alexandre Avenel
2866c868d5 Fix some typos using codespell (#285) 2017-11-11 18:11:15 +01:00
Lucas Verney
0453599752 Update installation doc to include doc about production values, fix #266. (#282) 2017-11-01 01:56:05 +01:00
0livd
b94bad829c Use token based auth to reset passwords (#269)
Send a mail containing a password reset
token link instead of sending a clear text
password.

Ref #232
2017-10-26 19:46:34 +02:00
0livd
293735eca7 Make authentication logic simpler and safer (#270)
* Fixed exposed password in session

The project password was set in clear text
in the session cookie. The cookie payload is
only base64 encoded so it must not be used to
store private information. The password is
simply replaced by a boolean.

* Simplify authentication logic
2017-10-23 23:03:44 +02:00
JocelynDelalande
e3285bef36 Enhance install process by generating config files from templates (#275)
* Add a command to generate configuration examples

Config files are generated from templates (which remplace previous example files).

- solve the issue of hard-to-explain configuration examples
- ease pkg path seeking (avoid it, actually)
- add working defaults for sqlite and unix socket paths (instead of
  /replace/me/path/example)
- move settings comments from default_settings.py to ihatemoney.cfg.j2, as it is
  the one that will be facing user.

* Use generate-config command  in install doc

Also follow the new working defaults of templates for socket and db path.

* Fix doc settings table

On the long term, plaintext tables might destroy humanity.

* Mention templates dir URL in documentation

As requested by @almet
2017-10-23 18:05:50 +02:00
0livd
efd2b66ac6 Do not import the whole werkzeug pkg (#271) 2017-09-07 11:02:12 +02:00
0livd
7a918c9349 Enhance the dashboard. (#262)
* Update to a more flexible admin authentication
* Admin can now access any project
* Add delete and edit options in the dashboard
* Add a link to the dashboard in the nav bar

This is a rework of the changes proposed by @Olivd, so they can apply on top of
the latest master without trouble. All credit goes to him for the code.
2017-09-04 15:44:20 +02:00
0livd
2ec4fb589f Add a statistics tab (#257) 2017-08-21 23:51:32 +02:00
0livd
ec4a099f18 Protect admin endpoints against brute force attacks (#249)
* Protect admin endpoints against brute force attacks

Add a throttling mechanism to prevent a client brute
forcing the authentication form, based on its ip address
Closes #245

* Reset attempt counters if they get memory hungry
2017-08-20 12:37:12 +02:00
0livd
a0d4917ac4 Fix misplaced datepicker configuration (#258)
Bootstrap-datepicker is only included in the
list_bills template but its configuration was
living in the layout template, leading to a
javascript error on every page except list_bills.

Fixes #256
2017-08-20 12:22:47 +02:00
0livd
c7815e4878 Fix #248: Database creation issue (#254)
In flask's development server, the route handlers
run in a different thread than the main thread
thus an in-memory database created in the main thread
cannot be acccessed by the route handlers.
Switching the default database location to a temporary
file solves the isssue.

See full explanation here:
https://gehrcke.de/2015/05/in-memory-sqlite-database-and-flask-a-threading-trap/
2017-08-06 04:06:21 +02:00
0livd
8fd53f827e Revert configuration tests deletion (#250)
Some supernatural power erased the configuration
tests, they're now back !
2017-07-09 22:29:57 +02:00
3a4282fd75 Absolute imports & some other improvements (#243)
* Use absolute imports and rename package to ihatemoney
* Add a ihatemoney command
* Factorize application creation logic
* Refactor the tests
* Update the wsgi.py module with the new create_app() function
* Fix some styling thanks to Flake8.
* Automate Flake8 check in the CI.
2017-07-07 00:06:56 +02:00