forked from OCA/server-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] auth_totp: Issue #187 #1
Open
max3903
wants to merge
55
commits into
SerpentConsultingServices:12.0-FIX-auth_totp
Choose a base branch
from
ursais:12.0-fix-auth_totp-187
base: 12.0-FIX-auth_totp
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[FIX] auth_totp: Issue #187 #1
max3903
wants to merge
55
commits into
SerpentConsultingServices:12.0-FIX-auth_totp
from
ursais:12.0-fix-auth_totp-187
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closes OCA#154
…P_REMOTE_USER in the HEADER of the HTTP request and trying^Co bind the given value to a user
…ion group from base_setup�[C
…to avoid session mismatch...
…er is found in odoo always issues Unauthorized (avoid redirect to the login page) If the uid in the session is not the same as the one from the binded HTTP_REMOTE_USER, always logout to clean up the session
… remains identical)
…nstead of uid Avoids a database query unless authentication is actually required.
In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association.
Fix introduced flake 8 errors
* [FIX] auth_from_http_remote_user - Lint * [FIX] server_environment - Lint * [FIX] base_module_doc_rst - Lint * [FIX] fetchmail_notify_error_to_sender - Fix XML view, it was the 'active' field from 'fetchmail_attach_from_folder' module which was targeted by mistake (belonging to another data model)
The parent method calls check_credentials which is also implemented here, so this is not needed.
Currently translated at 100.0% (25 of 25 strings) Translation: server-auth-12.0/server-auth-12.0-users_ldap_groups Translate-URL: https://translation.odoo-community.org/projects/server-auth-12-0/server-auth-12-0-users_ldap_groups/sl/
Currently translated at 100.0% (3 of 3 strings) Translation: server-auth-12.0/server-auth-12.0-auth_session_timeout Translate-URL: https://translation.odoo-community.org/projects/server-auth-12-0/server-auth-12-0-auth_session_timeout/sl/
Ping @murtuzasaleh |
b3f0953
to
ec2b8ea
Compare
Without this fix, when hitting the populate button, Odoo failed with: ``` Odoo Server Error Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/http.py", line 656, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 314, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/opt/odoo/custom/src/odoo/odoo/tools/pycompat.py", line 87, in reraise raise value File "/opt/odoo/custom/src/odoo/odoo/http.py", line 698, in dispatch result = self._call_function(**self.params) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 346, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 339, in checked_call result = self.endpoint(*a, **kw) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 941, in __call__ return self.method(*args, **kw) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 519, in response_wrap response = f(*args, **kw) File "/opt/odoo/auto/addons/web/controllers/main.py", line 966, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo/auto/addons/web/controllers/main.py", line 954, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo/custom/src/odoo/odoo/api.py", line 759, in call_kw return _call_kw_multi(method, model, args, kwargs) File "/opt/odoo/custom/src/odoo/odoo/api.py", line 746, in _call_kw_multi result = method(recs, *args, **kwargs) File "/opt/odoo/auto/addons/users_ldap_populate/models/users_ldap.py", line 189, in populate_wizard res_id = wizard_obj.create({'ldap_id': self.id}).id File "<decorator-gen-155>", line 2, in create File "/opt/odoo/custom/src/odoo/odoo/api.py", line 461, in _model_create_multi return create(self, [arg]) File "/opt/odoo/auto/addons/users_ldap_populate/models/populate_wizard.py", line 32, in create ldap.action_populate() File "/opt/odoo/auto/addons/users_ldap_populate/models/users_ldap.py", line 65, in action_populate results = self._get_ldap_entry_dicts(conf) File "/opt/odoo/auto/addons/users_ldap_populate/models/users_ldap.py", line 128, in _get_ldap_entry_dicts ldap_password.encode('utf-8') File "/usr/local/lib/python3.7/site-packages/ldap/ldapobject.py", line 382, in simple_bind_s msgid = self.simple_bind(who,cred,serverctrls,clientctrls) File "/usr/local/lib/python3.7/site-packages/ldap/ldapobject.py", line 376, in simple_bind return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) File "/usr/local/lib/python3.7/site-packages/ldap/ldapobject.py", line 263, in _ldap_call result = func(*args,**kwargs) TypeError: argument 1 must be str, not bytes ```
Don't know why the POT hasn't been regenerated.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-auth-12.0/server-auth-12.0-users_ldap_populate Translate-URL: https://translation.odoo-community.org/projects/server-auth-12-0/server-auth-12-0-users_ldap_populate/
# Conflicts: # auth_totp/controllers/main.py
ec2b8ea
to
d232cf0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Conflicts:
auth_totp/controllers/main.py