Commit Graph

44 Commits

Author SHA1 Message Date
Matt Scott
4f83879e95 Added Jinja filter for handle formatting of zone type labels to enforce modern social standards.
Removed text label of dashboard domain list action menu to reduce size.

Continuing work on re-design and clean-up of dashboard view.
2023-02-19 09:48:43 -05:00
Matt Scott
58aabacd91 Re-formatted base view template to be more in-line with PEP8 standards.
Working on dashboard clean-up and redesign.

Added custom Jinja date/time formatting function to utils.py.
2023-02-19 08:52:00 -05:00
Matt Scott
948973ac83 Merge branch 'feature/privacy-first' 2023-01-24 05:32:38 -05:00
Bernward Sanchez
c7eaec27d8
Update utils.py 2022-12-23 08:23:14 +08:00
Dominik Fahr
97a79645b0 fix of issue #1261
split record by "."
idna.encode leads into full stop if the string starts with "_" or "-"
2022-12-12 17:31:32 +01:00
Dominik Fahr
52169f698c undo of commit a7f55de
did not fix issue #1261
leaded into issue #1321
2022-12-12 17:30:42 +01:00
Matt Scott
e823f079b7
Merge pull request #1266 from WhatshallIbreaktoday/master
allow null/None JSON data (Used for pdns notifies via api and by LEGO-ACME v 4.9.0)
2022-12-08 21:57:18 -05:00
Bernward Sanchez
3e68044420
Update utils.py
This should fix the error you were experiencing, as it will now only attempt to process the `data` argument if it is a tuple containing two elements. If the `data` argument is not in the expected format, the function will simply return an empty string instead of raising an exception.
2022-12-09 08:15:13 +08:00
WhatshallIbreaktoday
d25a22272e allow null/None JSON data
This change permits to proxy pdns zone notify api requests (which are expected to be with empty body)
2022-10-12 08:10:35 +02:00
corubba
607caa1a2d Rework user image handling
Moved all the logic out of the template into a separate endpoint. This
makes it easy to extend to also support images from different sources
like LDAP/SAML/OIDC. Session-based caching is hard to do, so to allow
time-based caching in the browser, the url needs to be unique for every
user by using a query parameter.

Replaced the default/fallback user image with a new one. It is based on
the old one, but does not need css to be visible. And removed said css.

Gravatar has now its own setting named `gravatar_enabled`, which is
disabled by default.
2022-06-18 19:11:13 +02:00
Jérôme BECOT
a87b931520
feat: Move the account parse calls to a method 2022-06-18 14:30:56 +02:00
RGanor
81f158d9bc
enh: Enforce Record Restrictions in API (#1089)
Co-authored-by: Tom <tom@tom.com>
2022-06-18 14:20:49 +02:00
TomSebty
1926b862b8
feat: Option to forbid the creation of domain if it exists as a record (#1127)
When enabled, forbids the creation of a domain if it exists as a record in one of its parent domains (administrators and operators are not limited though).
2022-06-17 17:50:51 +02:00
jbe-dw
2a75013de4
Merge pull request #1163 from AdvanticGmbH/idna_decode
fix: use idna module to support extended character set
2022-06-17 15:47:55 +02:00
corubba
564ec6086d Replace pyOpenSSL with cryptography
This is literally the example from the docs [0]. The only thing I
adapted are the parameters for the keys and certificate, so they
stay the same.

Fixes #1086

[0] https://cryptography.io/en/latest/x509/tutorial/#creating-a-self-signed-certificate
2022-05-07 21:32:19 +02:00
AdvanticGmbH
40deb3c145 Create method to encode and decode idna
Previously strings with characters like "ß" would throw and exception
This seems to happen because the lib behind encode().decode('idna')
cant handle characters like this
2022-04-25 10:05:46 +02:00
root
940551e99e feat: Associate an API Key with accounts (#1044) 2021-12-03 14:12:11 +00:00
steschuser
ba2423d6f5
fix if condition in pretty_domain_name (#1008) 2021-10-30 21:29:55 +02:00
jbe-dw
b8ee91ab9a
fix: Accounts API is broken (#996) 2021-10-30 21:28:36 +02:00
steschuser
79457bdc85
Bug domain parse (#936) 2021-10-30 21:06:44 +02:00
jbe-dw
86700f8fd7
upd: improve user api (#878) 2021-03-16 19:39:53 +01:00
R. Daneel Olivaw
46993e08c0
Add punycode (IDN) support (#879) 2021-03-16 19:37:05 +01:00
Khanh Ngo
0dfced4968
Upgrade pip packages 2020-10-10 20:27:09 +02:00
Khanh Ngo
a3fd856dd8
Code refactoring and bug fixes 2020-06-19 08:47:51 +07:00
Nicolás Fantone
39db31b5ae Add missing ensure_list util function 2020-05-25 14:16:33 +01:00
Khanh Ngo
fd0485d897 Merge remote-tracking branch 'keesbos/mgmt' 2020-05-17 19:43:45 +07:00
Khanh Ngo
f2704649f1
Merge pull request #668 from pprietosanchez/fix_search_API_request
Correct request method
2020-03-06 14:08:39 +07:00
Enrico Tröger
2d55832729 Add missing format arguments for error message 2020-03-04 00:27:48 +01:00
pprietosanchez
a2d98d38e2 Correct request method 2020-02-28 16:25:19 +01:00
Khanh Ngo
52eb62a911
Fix unit tests
The python float number formatting causes unit tests failed
2020-02-13 16:22:07 +07:00
Khanh Ngo
13aab7f6ee
Merge pull request #645 from eht16/outgoing_request_logging
Add log message after remote server request
2020-02-12 09:45:12 +07:00
Enrico Tröger
81bfde5a79 Add log message after remote server request
This might be handy to detect remote server problems or debugging
timeouts and the like.
2020-02-02 15:23:00 +01:00
Kees Bos
4d391ccb34 Extend api with account and user management 2020-01-27 14:04:15 +00:00
Enrico Tröger
68843d9664 Add new setting to verify outgoing SSL connections
The new setting 'verify_ssl_connections' tells the requests library to
verify secured outgoing HTTP connections.
Usually verifying is desired and helps to reveal configuration
problems. It also disables an ugly warning when HTTPS connections
are made without verification.
2020-01-25 19:44:11 +01:00
Khanh Ngo
462190a913
Fix API key query 2019-12-22 10:06:02 +07:00
Khanh Ngo
59110432a0
Merge pull request #612 from Neven1986/saml_certificate_fix
SAML certificate fix and enhancement
2019-12-19 09:11:15 +07:00
Neven1986
567430790c SAML certificate fix and enhancement
Problems resolved:

- Method create_self_signed_cert() was invoked nowhere. This puts parameter "SAML_SIGN_REQUEST" description in configs/development.py as incorrect
- Method create_self_signed_cert() was returning error while trying to write out certificate and private key. File handler was opened for writing out TEXT instead of BINARY data

Enhancements:

- Two new parameters are introduced SAML_CERT_FILE and SAML_KEY_FILE. User can now explicitly define own certificate and key file anywhere on file-system.
- If parameters mentioned in previous bullet aren't explicitly defined, in PowerDNS-Admin root directory self-signed certificate will be created.
- Certificates will be used or generated in any case, because in saml.py there are explicit parameters defined which require certificate/key in order to work normally. If they aren't, exception will be thrown. Examples of parameters defined in saml.py requiring certificate: wantAssertionsEncrypted, signMetadata, wantAssertionsSigned.
2019-12-19 00:40:25 +01:00
Khanh Ngo
f5b88ebc73
Merge branch 'master' into record_adjustment 2019-12-16 15:54:38 +07:00
Khanh Ngo
14658d797e
Adjustment in domain's record applying 2019-12-14 14:47:21 +07:00
Khanh Ngo
ad6b04bd78
LGTM fixes 2019-12-14 08:31:23 +07:00
Khanh Ngo
c0594b2c0b
Fix SAML 2019-12-13 21:55:11 +07:00
Khanh Ngo
6af94df00a
LGTM fixes. Remove unused import and variables 2019-12-07 20:20:40 +07:00
Khanh Ngo
840e2a4750 Update docker stuff and bug fixes 2019-12-04 11:50:46 +07:00
Khanh Ngo
8ea00b9484
Refactoring the code
- Use Flask blueprint
- Split model and views into smaller parts
- Bug fixes
- API adjustment
2019-12-02 10:32:03 +07:00