Skip to content

Commit

Permalink
Merge branch 'dpgaspar:master' into feature/use-joserfc-to-evaluate-a…
Browse files Browse the repository at this point in the history
…zure-jwt
  • Loading branch information
wolfdn authored Oct 5, 2023
2 parents 3c17998 + e4d613a commit ec14163
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
Flask-AppBuilder ChangeLog
==========================

Improvements and Bug fixes on 4.3.7
-----------------------------------

- fix: fix: swagger missing nonce (#2116) [Daniel Vaz Gaspar]

Improvements and Bug fixes on 4.3.6
-----------------------------------

fix: increase email field length (#2102) [Daniel Vaz Gaspar]
- fix: increase email field length (#2102) [Daniel Vaz Gaspar]

Improvements and Bug fixes on 4.3.5
-----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This method will authenticate the user's credentials against an LDAP server.

WARNING: To use LDAP you need to install `python-ldap <https://www.python-ldap.org>`_.

For a typical Microsoft AD setup (where all users can preform LDAP searches)::
For a typical Microsoft AD setup (where all users can perform LDAP searches)::

AUTH_TYPE = AUTH_LDAP
AUTH_LDAP_SERVER = "ldap://ldap.example.com"
Expand Down
2 changes: 1 addition & 1 deletion flask_appbuilder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Daniel Vaz Gaspar"
__version__ = "4.3.6"
__version__ = "4.3.7"

from .actions import action # noqa: F401
from .api import ModelRestApi # noqa: F401
Expand Down
6 changes: 3 additions & 3 deletions flask_appbuilder/security/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ def _search_ldap(self, ldap, con, username):
if len(self.auth_roles_mapping) > 0:
request_fields.append(self.auth_ldap_group_field)

# preform the LDAP search
# perform the LDAP search
log.debug(
"LDAP search for '%s' with fields %s in scope '%s'",
filter_str,
Expand Down Expand Up @@ -1114,7 +1114,7 @@ def auth_user_ldap(self, username, password):
user_attributes = {}

# Flow 1 - (Indirect Search Bind):
# - in this flow, special bind credentials are used to preform the
# - in this flow, special bind credentials are used to perform the
# LDAP search
# - in this flow, AUTH_LDAP_SEARCH must be set
if self.auth_ldap_bind_user:
Expand Down Expand Up @@ -1150,7 +1150,7 @@ def auth_user_ldap(self, username, password):

# Flow 2 - (Direct Search Bind):
# - in this flow, the credentials provided by the end-user are used
# to preform the LDAP search
# to perform the LDAP search
# - in this flow, we only search LDAP if AUTH_LDAP_SEARCH is set
# - features like AUTH_USER_REGISTRATION & AUTH_ROLES_SYNC_AT_LOGIN
# will only work if AUTH_LDAP_SEARCH is set
Expand Down
2 changes: 1 addition & 1 deletion flask_appbuilder/templates/appbuilder/init.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{% endif %}
<link href="{{url_for('appbuilder.static',filename='datepicker/bootstrap-datepicker.css')}}" rel="stylesheet">
<link href="{{url_for('appbuilder.static',filename='select2/select2.css')}}" rel="stylesheet">
<link href="{{url_for('appbuilder.static',filename='select2/select2-bootstrap-theme.css')}}" rel="stylesheet">
<link href="{{url_for('appbuilder.static',filename='select2/select2-bootstrap-theme.css')}}" rel="stylesheet">
<link href="{{url_for('appbuilder.static',filename='css/flags/flags16.css')}}" rel="stylesheet">
<link href="{{url_for('appbuilder.static',filename='css/ab.css')}}" rel="stylesheet">
{% endblock %}
Expand Down
11 changes: 5 additions & 6 deletions flask_appbuilder/templates/appbuilder/swagger/swagger.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
{% block head_css %}
{{ super() }}
<link type="text/css" rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@4/swagger-ui.css">
<link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png">
href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.css"
nonce="{{ baselib.get_nonce() }}">
{% endblock %}

{% block content %}
<div id="swagger-ui">
</div>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@4/swagger-ui-bundle.js" nonce="{{ baselib.get_nonce() }}"></script>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.js"
nonce="{{ baselib.get_nonce() }}"></script>
<!-- `SwaggerUIBundle` is now available on the page -->
<script>

<script nonce="{{ baselib.get_nonce() }}">
const ui = SwaggerUIBundle({
url: '{{openapi_uri}}',
dom_id: '#swagger-ui',
Expand All @@ -22,7 +22,6 @@
SwaggerUIBundle.SwaggerUIStandalonePreset
],
layout: "BaseLayout"

})
</script>
{% endblock %}

0 comments on commit ec14163

Please sign in to comment.