Commit Graph

14 Commits

Author SHA1 Message Date
DL6ER 813509841b Accept cookie authentication only when CSRF header is provided (and correct)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-06-04 19:29:54 +02:00
Christian König 62cfc25b95 Fix spelling in v6
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-05-30 22:42:13 +02:00
DL6ER 149ec4e0dd Add test for re-importing the just exported Teleporter file during the tests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-26 20:11:55 +01:00
DL6ER 48fc06d46b Add POST /api/teleporter to upload and install backed up configuration
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-25 21:51:12 +01:00
DL6ER e4383775d1 Add /api/action/gravity which can be used to trigger a run of pihole -g. The output is live streamed using HTTP/1.1 chunked encoding.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-24 20:15:45 +01:00
DL6ER 13168c377b Add GET /api/teleporter
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-23 21:56:11 +01:00
DL6ER 2d6c25d573 Add GET /config/{element} for more specific requests as well as PATCH and DELETE /config/{element}/{value} for direct array manipulation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 18:19:19 +01:00
DL6ER f199ac2f08 Automatically migrate the API password hash and the lists of clients and domains to be excluded from setupVars.conf
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 21:21:38 +01:00
DL6ER 4ac52263e9 Implement login for python API checking script
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 16:04:26 +01:00
DL6ER 3c5c1d52b7 Transform log_debug() into a function-like macro to save some time when we are not in debugging mode (the function is not called in this case)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 09:55:51 +01:00
DL6ER b8354c515c Fix debug flag parsing after changing from bit-wise flags to individual bools
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-07 20:08:38 +01:00
DL6ER e145d20d28 Rewrite the entire config-related code to allow for changing data without having to restart. Hereby, we greatly reduce code duplication in the TOML routines so we won't have to touch tme in the future when adding additional options.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-07 18:06:41 +01:00
DL6ER 6d7239dbc8 Add example verification when (possibly multiple) global examples are provided below the schema level
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 22:08:55 +01:00
DL6ER f2d68f20d7 Also verify endpoint structure: Query endpoints from FTL and check if all properties mentioned in the docs are present (and of correct type) and that there are no extra properties we forgot to document. Furthermore, also verify that the provided examples are of correct type, too.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 21:51:13 +01:00