Commit graph

1576 commits

Author SHA1 Message Date
Laurent Peuch
1cd121e801 [doc] add comment explaining choices in _hash_user_password 2017-08-15 20:54:58 +02:00
Laurent Peuch
970d9b0207 [fix] uses strong hash for admin password 2017-08-15 12:52:44 +02:00
Laurent Peuch
c5a44b8638 [fix] also uses sha512 in user_update() 2017-08-15 00:34:33 +02:00
Laurent Peuch
147b305e8a [mod] extract password generation code to a function 2017-08-15 00:34:07 +02:00
Laurent Peuch
685f3746ef [fix] forgot to remove args from actionsmap 2017-08-14 23:07:47 +02:00
Laurent Peuch
6c9156c3ae [enh] according to https://www.safaribooksonline.com/library/view/practical-unix-and/0596003234/ch04s03.html we can go up to 16 salt caracters 2017-08-14 16:49:50 +02:00
Laurent Peuch
4419ec10ce [fix] move to sh512 because it's fucking year 2017 2017-08-14 16:09:46 +02:00
Laurent Peuch
49d5c70fd6 [mod] add more salt because life is miserable 2017-08-14 15:44:06 +02:00
Laurent Peuch
9d0e615bb4 [enh] use the full length of available chars for salt generation 2017-08-14 15:24:45 +02:00
Laurent Peuch
8c6db3845d [fix] use real random for hash selection 2017-08-14 15:23:51 +02:00
Laurent Peuch
c14acc0fae [mod] don't use exception when not needed 2017-08-14 10:38:32 +02:00
Laurent Peuch
d14bc31771 [mod] directly call python instead of using os.system 2017-08-14 10:37:05 +02:00
Laurent Peuch
32002d56a0 [mod] inline for code lisibility 2017-08-14 00:54:33 +02:00
Laurent Peuch
062ceff612 [mod] style 2017-08-14 00:53:46 +02:00
Laurent Peuch
d441290b2f [mod] lisibility 2017-08-14 00:53:13 +02:00
Laurent Peuch
ad285937f3 [mod] to the real test 2017-08-14 00:50:35 +02:00
Laurent Peuch
c8ce4f843a [mod] style 2017-08-14 00:48:37 +02:00
Laurent Peuch
d0666d86d6 [mod] we don't use those filter/offset/limit stuff 2017-08-14 00:47:16 +02:00
Laurent Peuch
f41c2dd763 [mod] remove unused import 2017-08-13 23:14:40 +02:00
Laurent Peuch
ee7fd825d4 [mod] remove unused variables 2017-08-13 23:14:17 +02:00
ljf (zamentur)
bb4af396d8 [fix] Make read-only mount bind actually read-only (#343)
* [fix] Mount bind readonly not really readonly
* Attempt to clarify and fix some issues with the readonly mount
* Fix some missing messages and exception handling
* Get rid of horrible bash command
* Use subproces.check_call to avoid security hazard
* Revert comment about hard link
* Add test that mount binds are readonly
2017-08-13 22:28:36 +02:00
ljf (zamentur)
3ede5fc39d [fix] Backup without info.json (#342)
* [fix] Backup without info.json
* Add test of archive restore with no info.json
* Fix exception handling in backup_delete when info.json is missng
2017-08-13 22:26:28 +02:00
Laurent Peuch
02ea0c0656 [enh] Add reboot/shutdown actions in tools (#190)
* [enh] Implements shutdown/reboot helpers.
* [enh] Improve reboot/shutdown help.
2017-08-11 16:16:09 +02:00
Laurent Peuch
cd9444f647 Merge pull request #341 from YunoHost/timeout_dyndns
[fix] timeout on request to avoid blocking process
2017-08-11 08:49:51 +02:00
Alexandre Aubin
a5331063cc Put request url in an intermediate variable 2017-08-09 16:12:35 +02:00
Laurent Peuch
31105b8c86 [fix] timeout on request to avoid blocking process 2017-08-08 13:24:16 +02:00
Alexandre Aubin
0d6a0d6f7d Update changelog for 2.7.0 release 2017-08-07 13:28:33 -04:00
YunoHost Bot
7054f8a5bf Update from Weblate. (#340)
* Added translation using Weblate (Russian)
* [i18n] Translated using Weblate (Russian)

Currently translated at 2.4% (8 of 332 strings)
2017-08-07 18:23:53 +02:00
Alexandre Aubin
d6d4717bb2 [fix] Tests were broken from recent changes about m18n 2017-08-07 12:16:31 -04:00
Laurent Peuch
a441f37454 Migration framework (#195)
* [enh] list migrations
* [enh] first version of the migrate command
* [mod] add todo comment
* [mod] migrate command shouldn't return anything
* [mod] rename yunohost_migrations to data_migrations
* [mod] better regex
* [enh] had base class for migration
* [fix] inverted condition
* [enh] save last runned migration
* [enh] add migrations state command
* [mod] add todo comments
* [mod] error handling
* [mod] DRY
* [doc] more comment
* [enh] handle exceptions on migration
* [mod] error handling
* [mod] DRY
* [enh] error handling
* [mod] this is done earlier
* [doc] docstring
* [enh] handle fail to load migration case
* [doc] add TODO Comment
* [fix] typos, thx ju
* [enh] add a migration to remove archivemount (as an example)
* [fix] check_call is boring
* [enh] support forward/backward migrations
* [mod] I don't need auth
* [fix] apt is expecting input...
* [mod] save it as int
* [mod] add some logging
* [doc] update todo
* [fix] I also need to run backward latest runed migration
* [enh] add target cli argument
* [enh] fake migration
* [enh] uniformly convert to int at the same place
* [fix] we need to filename now
* [enh] validate input
* [enh] handle 0 special case
* [mod] rename fake to skip
* [mod] s/runed/run/g
* [doc] anglich typo in comments
* [mod] more explicit error message
* [mod] more typo
* [doc] put comment in the right place
* [mod] typo
* [fix] forgot to cape migrations by target
* [fix] typo
* [mod] uses moulinette helpers
* [enh] launch migrations during package upgrade
* [mod] remove unused import
* [mod] sort translation keys
* [enh] i18n
* [fix] missing __init__.py in data_migrations
* [mod] move to a subcategory
* Typo / caps / consistency
* [fix] forgot that migrations is now in tools, in postinst
* Skip migrations during postinstall
* Remove archivemount example migration
It relied on apt-get, which can't be used during 'postinst' debian scripts because we're already inside a apt
* Add migration for cert group from 'metronome' to 'ssl-cert'
2017-08-07 15:55:18 +02:00
e-lie
36770b0eda [fix] No default backup method (redmine 968) (#339) 2017-08-07 15:30:25 +02:00
opi
535f36b1c1 [fix] Properly catch Invalid manifest json with ValueError. (#324)
* [fix] Properly catch Invalid manifest json with ValueError.
* [fix] display detailed error in every case for invalid manifest
2017-08-07 15:29:53 +02:00
Laurent Peuch
3235f5f3fe [mod] autopep8 2017-08-07 06:58:29 +02:00
Alexandre Aubin
88a6c3d83a Missing parenthesis in helper :| 2017-08-06 02:37:17 +02:00
Laurent Peuch
99292e32d1 Merge pull request #336 from YunoHost/unglobify_some_globals
[mod] explicitely import previously globals magic variables
2017-08-05 12:24:50 +02:00
anmol26s
7d5779fcab [enh] Check that user is legitimate to use an email adress when sending mail (#330) 2017-08-05 12:11:53 +02:00
Maniack Crudelis
f4fabe1edb Fix syntax error: unexpected end of file (#337) 2017-08-02 18:44:32 +02:00
Maniack Crudelis
8f173543bb Fix syntax error: unexpected end of file (#338) 2017-08-02 18:44:16 +02:00
Alexandre Aubin
3a777ccbc7 [microdecision] Renaming ynh_backup_after_failed_upgrade to ynh_restore_upgradebackup 2017-07-28 14:22:04 -04:00
Maniack Crudelis
a006868cbe New helpers ynh_add_systemd_config and ynh_remove_systemd_config (#287)
* New helpers ynh_add_systemd_config and ynh_remove_systemd_config
Standard file for systemd service.
* ynh_subsistute_char was renamed ynh_replace_string
* Upgrade helpers
* Add some description of which keywords are replaced by which variable
2017-07-28 19:21:22 +02:00
Maniack Crudelis
80242a8edc New helpers ynh_add_nginx_config and ynh_remove_nginx_config (#285)
* New helpers ynh_add_nginx_config and ynh_remove_nginx_config
Standard configuration of nginx
Use local files stored in conf/, so it's still possible to use a specific config
* ynh_substitute_char was renamed ynh_replace_string
* ynh_compare_checksum_config -> ynh_backup_if_checksum_is_different
* Upgrade helpers
* Add some description of which keywords are replaced by which variable
2017-07-28 19:11:28 +02:00
Maniack Crudelis
bf45cd7c4b New helpers ynh_backup_after_failed_upgrade and ynh_backup_before_upg… (#289)
* New helpers ynh_backup_after_failed_upgrade and ynh_backup_before_upgrade
Create a backup at the beginning of upgrade script.
Then, if the upgrade script failed, remove the app and restore it.
The backup is kept, to provide a way to restore if the upgrade is finally a bad thing.
* Implement @JimboJoe's comments
* Indentation
* --ignore-hooks -> --ignore-system
2017-07-28 18:53:43 +02:00
Alexandre Aubin
59c918bbfa Merge branch 'testing' into unstable 2017-07-26 11:58:22 -04:00
Alexandre Aubin
91bfd5e266 Update changelog for 2.6.5 release 2017-07-26 11:57:12 -04:00
Alexandre Aubin
2c67d062c6 [fix] Do not crash if archivemount is not there (#325) 2017-07-26 11:55:02 -04:00
Laurent Peuch
46cb9637b2 [fix] missing m18n import 2017-07-26 05:43:08 +02:00
Laurent Peuch
baf0d098f5 [mod] explicitely import previously globals magic variables 2017-07-25 21:32:20 +02:00
Alexandre Aubin
a513d0ecbe [enh] Check that url is available and normalize path before app install (#304) 2017-07-24 20:11:58 +02:00
Maniack Crudelis
390835e96a [fix] Logrotate append (#328)
* [fix] Logrotate append
* Typo fix by JimboJoe
2017-07-24 02:50:48 +02:00
Alexandre Aubin
3afbf0f7b9 [fix] Depreciation warning for --hooks was always shown (#333) 2017-07-23 01:56:05 +02:00