Adrià Casajús
25fde11a86
Refactor alias suffix ( #1194 )
...
* Extract suffix generation and validation to a module
* Updated tests
* Make custom alias use signed suffixes
* Added the signature check to the module
* Fix invalid route
* Move more suffix related stuff
* Fix tests
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-27 17:40:22 +02:00
Son
debed67c68
return whether a domain is custom or primary in GET /api/v5/alias/options
2022-04-14 17:28:40 +02:00
Son
462164ff16
use tldextract to extract hostname
2021-10-18 11:45:48 +02:00
Son
372466ab06
do not use flask-sqlalchemy
...
- add __tablename__ for all models
- use sa and orm instead of db
- rollback all changes in tests
- remove session in @app.teardown_appcontext
2021-10-12 14:36:47 +02:00
Son NK
ef32998e99
Remove /alias/options, /v2/alias/options, /v3/alias/options
2021-06-05 17:41:18 +02:00
Son NK
aa667851e9
log user-agent in deprecated endpoint
2021-05-28 17:46:34 +02:00
Son NK
8cfd5e01dc
add alerts on /alias/custom/new and /v3/alias/options and below
2021-05-25 19:36:45 +02:00
Son NK
33dd6083c7
rename available_suffixes_more_info -> get_available_suffixes
2020-12-31 14:27:04 +01:00
Son NK
5a3b79b4cf
replace available_suffixes by available_suffixes_more_info
2020-12-31 14:25:44 +01:00
Son NK
9cfb6d412a
Add /api/v5/alias/options
2020-11-14 16:45:22 +01:00
Son NK
f0b46c1887
use warning log for /alias/options
2020-10-26 10:31:19 +01:00
Son NK
83f3309149
use warning log for /v3/alias/options
2020-10-24 16:28:07 +02:00
Son NK
32e25f5378
bring back alias/options v1,2,3
2020-10-20 17:31:43 +02:00
Son NK
886d3a761c
delete /alias/options v1,v2,v3
2020-10-19 12:08:47 +02:00
Son NK
f56b0cddb2
use exception log for /alias/options endpoints
2020-10-15 16:02:04 +02:00
Son NK
774ffcae3b
enable CORS on /api endpoints
2020-06-24 10:30:01 +02:00
Son NK
62bec84900
Add obsolete warnings
2020-05-02 16:23:40 +02:00
Son NK
72e9b52b29
Add /api/v4/alias/options
2020-05-02 16:21:18 +02:00
Son NK
48202e905f
rename verify_api_key -> require_api_auth
2020-04-25 13:42:53 +02:00
Son NK
4c1c02db60
Add /v3/alias/options
2020-03-29 23:13:04 +02:00
Son NK
2d90d35647
rename gen_email_id -> alias_id
2020-03-17 12:01:18 +01:00
Son NK
4f281bdbbb
rename GenEmail -> Alias, gen_email to alias whenever possible
2020-03-17 11:51:40 +01:00
Son NK
8faf34ce40
Use warning level for /v2/alias/options
2020-03-16 21:10:53 +01:00
Son NK
f7d000d34e
alert when /alias/options is used
2020-02-04 23:01:33 +07:00
Son NK
926cc2935c
take into account DISABLE_ALIAS_SUFFIX in /api/alias/options
2020-01-22 14:21:01 +01:00
Son NK
bdf75951f1
support ALIAS_DOMAINS
...
- use verify_prefix_suffix() in /api/alias/custom/new
-
2020-01-22 10:24:17 +01:00
Son NK
96da841062
add /api/v2/alias/options that flattens the response
2020-01-05 20:47:09 +01:00
Son NK
8f04f8ae0f
rename can_create_new_custom_alias -> can_create_new_alias
2019-12-22 16:27:55 +00:00
Son NK
565d406227
remove new_random_alias related test
2019-12-15 18:55:18 +02:00
Son NK
e5079e48da
remove can_create_new_random_alias()
2019-12-15 18:55:18 +02:00
Son NK
631900ab4f
use random_word instead of random_string for alias suffix
2019-12-15 18:55:17 +02:00
Son NK
f37a155c1f
still return custom alias option when user runs out of custom alias quota
2019-12-15 18:55:17 +02:00
Son NK
c3056dc94c
use website domain name as alias prefix suggestion (instead of full hostname)
2019-12-15 18:55:17 +02:00
Son NK
a9e781da84
use the latest used alias as recommendation
2019-12-15 18:55:16 +02:00
Son NK
ab4f5bf329
add /api/alias/options
2019-12-15 18:55:16 +02:00