diff --git a/configs/development.py b/configs/development.py index b848d0c..d4bd24f 100644 --- a/configs/development.py +++ b/configs/development.py @@ -15,17 +15,6 @@ SQLA_DB_HOST = '127.0.0.1' SQLA_DB_NAME = 'pda' SQLALCHEMY_TRACK_MODIFICATIONS = True -#CAPTCHA Config -CAPTCHA_ENABLE = True -CAPTCHA_LENGTH = 6 -CAPTCHA_WIDTH = 160 -CAPTCHA_HEIGHT = 60 -CAPTCHA_SESSION_KEY = 'captcha_image' - -#Server side sessions tracking -#Set to TRUE for CAPTCHA, or enable another stateful session tracking system -FILESYSTEM_SESSIONS_ENABLED = True - ### DATABASE - MySQL #SQLALCHEMY_DATABASE_URI = 'mysql://{}:{}@{}/{}'.format( # urllib.parse.quote_plus(SQLA_DB_USER), diff --git a/package.json b/package.json index f6724c3..76982c8 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,15 @@ { "dependencies": { - "@fortawesome/fontawesome-free": "6.3.0", - "admin-lte": "3.2.0", - "bootstrap": "4.6.2", - "bootstrap-datepicker": "^1.9.0", + "admin-lte": "2.4.9", + "bootstrap": "^3.4.1", + "bootstrap-datepicker": "^1.8.0", "bootstrap-validator": "^0.11.9", - "datatables.net-plugins": "^1.13.1", + "datatables.net-plugins": "^1.10.19", "icheck": "^1.0.2", "jquery-slimscroll": "^1.3.8", - "jquery-sparkline": "^2.4.0", - "jquery-ui-dist": "^1.13.2", + "jquery-ui-dist": "^1.12.1", "jquery.quicksearch": "^2.4.0", - "jtimeout": "^3.2.0", + "jtimeout": "^3.1.0", "multiselect": "^0.9.12" } } diff --git a/powerdnsadmin/assets.py b/powerdnsadmin/assets.py index 7ad973f..233e23a 100644 --- a/powerdnsadmin/assets.py +++ b/powerdnsadmin/assets.py @@ -2,65 +2,67 @@ from flask_assets import Bundle, Environment, Filter class ConcatFilter(Filter): - """ - Filter that merges files, placing a semicolon between them. + """ + Filter that merges files, placing a semicolon between them. - Fixes issues caused by missing semicolons at end of JS assets, for example - with last statement of jquery.pjax.js. - """ - def concat(self, out, hunks, **kw): - out.write(';'.join([h.data() for h, info in hunks])) + Fixes issues caused by missing semicolons at end of JS assets, for example + with last statement of jquery.pjax.js. + """ + def concat(self, out, hunks, **kw): + out.write(';'.join([h.data() for h, info in hunks])) -css_login = Bundle( - 'node_modules/@fortawesome/fontawesome-free/css/all.min.css', - 'node_modules/icheck/skins/square/blue.css', - 'node_modules/admin-lte/dist/css/adminlte.css', - filters=('cssmin', 'cssrewrite'), - output='generated/login.css') -js_login = Bundle( - 'node_modules/jquery/dist/jquery.js', - 'node_modules/bootstrap/dist/js/bootstrap.js', - 'node_modules/icheck/icheck.js', - 'custom/js/custom.js', - filters=(ConcatFilter, 'rjsmin'), - output='generated/login.js') +css_login = Bundle('node_modules/bootstrap/dist/css/bootstrap.css', + 'node_modules/font-awesome/css/font-awesome.css', + 'node_modules/ionicons/dist/css/ionicons.css', + 'node_modules/icheck/skins/square/blue.css', + 'node_modules/admin-lte/dist/css/AdminLTE.css', + filters=('cssmin', 'cssrewrite'), + output='generated/login.css') -js_validation = Bundle( - 'node_modules/bootstrap-validator/dist/validator.js', - output='generated/validation.js') +js_login = Bundle('node_modules/jquery/dist/jquery.js', + 'node_modules/bootstrap/dist/js/bootstrap.js', + 'node_modules/icheck/icheck.js', + 'custom/js/custom.js', + filters=(ConcatFilter, 'rjsmin'), + output='generated/login.js') + +js_validation = Bundle('node_modules/bootstrap-validator/dist/validator.js', + output='generated/validation.js') css_main = Bundle( - 'node_modules/@fortawesome/fontawesome-free/css/all.min.css', - 'node_modules/datatables.net-bs4/css/dataTables.bootstrap4.min.css', - 'node_modules/icheck/skins/square/blue.css', - 'node_modules/multiselect/css/multi-select.css', - 'node_modules/admin-lte/dist/css/adminlte.css', - 'custom/css/custom.css', - 'node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css', - filters=('cssmin', 'cssrewrite'), - output='generated/main.css') + 'node_modules/bootstrap/dist/css/bootstrap.css', + 'node_modules/font-awesome/css/font-awesome.css', + 'node_modules/ionicons/dist/css/ionicons.css', + 'node_modules/datatables.net-bs/css/dataTables.bootstrap.css', + 'node_modules/icheck/skins/square/blue.css', + 'node_modules/multiselect/css/multi-select.css', + 'node_modules/admin-lte/dist/css/AdminLTE.css', + 'node_modules/admin-lte/dist/css/skins/_all-skins.css', + 'custom/css/custom.css', + 'node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css', + filters=('cssmin', 'cssrewrite'), + output='generated/main.css') -js_main = Bundle( - 'node_modules/jquery/dist/jquery.js', - 'node_modules/jquery-ui-dist/jquery-ui.js', - 'node_modules/bootstrap/dist/js/bootstrap.bundle.js', - 'node_modules/datatables.net/js/jquery.dataTables.js', - 'node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js', - 'node_modules/jquery-sparkline/jquery.sparkline.js', - 'node_modules/jquery-slimscroll/jquery.slimscroll.js', - 'node_modules/icheck/icheck.js', - 'node_modules/fastclick/lib/fastclick.js', - 'node_modules/moment/moment.js', - 'node_modules/admin-lte/dist/js/adminlte.js', - 'node_modules/multiselect/js/jquery.multi-select.js', - 'node_modules/datatables.net-plugins/sorting/natural.js', - 'node_modules/jtimeout/src/jTimeout.js', - 'node_modules/jquery.quicksearch/src/jquery.quicksearch.js', - 'custom/js/custom.js', - 'node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js', - filters=(ConcatFilter, 'rjsmin'), - output='generated/main.js') +js_main = Bundle('node_modules/jquery/dist/jquery.js', + 'node_modules/jquery-ui-dist/jquery-ui.js', + 'node_modules/bootstrap/dist/js/bootstrap.js', + 'node_modules/datatables.net/js/jquery.dataTables.js', + 'node_modules/datatables.net-bs/js/dataTables.bootstrap.js', + 'node_modules/jquery-sparkline/jquery.sparkline.js', + 'node_modules/jquery-slimscroll/jquery.slimscroll.js', + 'node_modules/icheck/icheck.js', + 'node_modules/fastclick/lib/fastclick.js', + 'node_modules/moment/moment.js', + 'node_modules/admin-lte/dist/js/adminlte.js', + 'node_modules/multiselect/js/jquery.multi-select.js', + 'node_modules/datatables.net-plugins/sorting/natural.js', + 'node_modules/jtimeout/src/jTimeout.js', + 'node_modules/jquery.quicksearch/src/jquery.quicksearch.js', + 'custom/js/custom.js', + 'node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js', + filters=(ConcatFilter, 'rjsmin'), + output='generated/main.js') assets = Environment() assets.register('js_login', js_login) diff --git a/powerdnsadmin/routes/__init__.py b/powerdnsadmin/routes/__init__.py index 598b17a..7d8aa9a 100644 --- a/powerdnsadmin/routes/__init__.py +++ b/powerdnsadmin/routes/__init__.py @@ -1,5 +1,5 @@ from .base import ( - captcha, csrf, login_manager, handle_bad_request, handle_unauthorized_access, + csrf, login_manager, handle_bad_request, handle_unauthorized_access, handle_access_forbidden, handle_page_not_found, handle_internal_server_error ) @@ -14,7 +14,6 @@ from .api import api_bp, apilist_bp def init_app(app): login_manager.init_app(app) csrf.init_app(app) - captcha.init_app(app) app.register_blueprint(index_bp) app.register_blueprint(user_bp) diff --git a/powerdnsadmin/routes/admin.py b/powerdnsadmin/routes/admin.py index 98f4ef9..e419fa8 100644 --- a/powerdnsadmin/routes/admin.py +++ b/powerdnsadmin/routes/admin.py @@ -795,7 +795,7 @@ class DetailedHistory(): if 'domain_type' in detail_dict and 'account_id' in detail_dict: # this is a domain creation self.detailed_msg = render_template_string("""
Domain Type: | {{ domaintype }} |
Domain type: | {{ domaintype }} |
Account: | {{ account }} |
+ User {{ username }} authentication {{ auth_result }} + |
+ ||||
---|---|---|---|---|
Username: | -{{ username }} | -|||
Authentication Result: | -{{ auth_result }} | -|||
Authenticator Type: | -{{ authenticator }} | +{{ authenticator }} | ||
IP Address: | -{{ ip_address }} | +IP Address | +{{ ip_address }} |