moodle invalid response after successful userlogin - moodle

i was facing issue in moodle user was not able to logged in so i change the DB collation and user is now able to login into dashboard but i am also getting this error.
Now user is able to login but this popup error is coming.
invalidresponse
Invalid response value detected
File: /lib/externallib.php
Line: 425
Stack trace:
Error in response - Missing following required key in a single structure: tourconfig
Error code: invalidresponse
* line 425 of /lib/externallib.php: invalid_response_exception thrown
* line 250 of /lib/externallib.php: call to external_api::clean_returnvalue()
* line 59 of /lib/ajax/service.php: call to external_api::call_external_function()

For me, user was not able to login into Moodle and it was the dmlwrite exception. So i changed the DB collation of user table and it's started throwing an error after user logged in.
We are running this whole setup on digital ocean and due to some issue in CPU & Memory, i recycle my whole kubernetes cluster and error resolve automatically.
So as #adrian-sărmaș suggested clear cache and give it try for me maybe it was only issue of caching.

Related

Vertx Form Login Handler with Postgresql Failure

I am trying to authenticate user using FormLoginHandler and Postgresql Database with SqlAuthentication.
But I get the following error:
Jun 15, 2022 1:14:34 PM io.vertx.ext.web.RoutingContext
SEVERE: Unhandled exception in router
io.vertx.ext.web.handler.HttpException: Unauthorized
Caused by: io.vertx.core.impl.NoStackTraceThrowable: Invalid username/password
I am providing the right credentials.
The code snippet is:
SqlAuthenticationOptions sauthopts = new SqlAuthenticationOptions();
sauthopts.setAuthenticationQuery(AUTHENTICATE_QUERY);
SqlAuthentication authenticationProvider = SqlAuthentication.create(sqlClient, sauthopts);
router.route("/secure/*").handler(RedirectAuthHandler.create(authenticationProvider, "/login.html"));
FormLoginHandler formLoginHandler = FormLoginHandler.create(authenticationProvider);
router.route("/loginhandler").handler(formLoginHandler);
Please let me know if I am missing something here; or point me to a sample example.
Thanks in Advance.
Your setup doesn't show anything abnormal at first sight. For security reasons, we cannot "just" log the authentication data, as it would be a critical OWASP bug and security vulnerability.
My best guess is that probably is something not totally correct with the query, so this means you have now 2 options:
debug the application and see the query that is being sent + the arguments
prepare a small complete example that shows the bug and open an issue in vert.x so we can debug it further.
If you're upgrading from an older version, be aware that in vert.x 4.2.0 some changes were made to the base64 encoding to keep it consistent across modules. This could be a reason why authentication could fail as the encoded hashes may be slightly different. If you're just doing 4.3.0 from the start, then this would not be a problem.

Unable to open ejabbered web dashboard localhost:5280

I am new to ejabberd and trying to play with it. I installed ejabbered following the instructions present at official doc page with username and password. I am able to start the ejabbered server and connect to it through Java using "Smack" API's.
However, when I try to open Web Dashboard at http://localhost:5280/admin/ and then login with admin user, It doesn't show up anything. When I checked logs, it shows following erros -
2020-03-13 21:03:17.618 [error] <0.1965.0>#ejabberd_http:apply_custom_headers:860 CRASH REPORT Process <0.1965.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
2020-03-13 21:03:17.619 [error] <0.535.0>#ejabberd_http:apply_custom_headers:860 Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.1965.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
Pleasse help me out with this. Thanks!
Yes, that problem was introduced in ejabberd 20.02, and it's fixed in the following versions.
You have two options:
Download ejabberd 20.01, that doesn't have this problem
Or download ejabberd 20.03 or above.

Twitter4j 401 Authentication Exception just when calling getFriendsList

twitter.verifyCredentials() //works fine and returns my account as a User
twitter.getFriendsList(someUserId, -1, 100) //throws exception
Authentication Exception:
twitter4j.TwitterException: 401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
{"request":"\/1.1\/friends\/list.json","error":"Not authorized."}
at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:163) ~[org.twitter4j.twitter4j-core-4.0.3.jar:4.0.3]
at twitter4j.HttpClientBase.request(HttpClientBase.java:53) ~[org.twitter4j.twitter4j-core-4.0.3.jar:4.0.3]
at twitter4j.HttpClientBase.get(HttpClientBase.java:71) ~[org.twitter4j.twitter4j-core-4.0.3.jar:4.0.3]
at twitter4j.TwitterImpl.get(TwitterImpl.java:1544) ~[org.twitter4j.twitter4j-core-4.0.3.jar:4.0.3]
at twitter4j.TwitterImpl.getFriendsList(TwitterImpl.java:474) ~[org.twitter4j.twitter4j-core-4.0.3.jar:4.0.3]
I synced the system clock. But this seems kind of odd since the verifyCredentials works fine but getFriendsList throws this exception. I also do some following/unfollowing with this account with this account which works fine.
Found the cause by myself:
The user I was trying to get the followings from was protected. To get these followings you need to get authorized by the user.

Salesforce Auth Provider - Not working

We have an integration which was working till 2nd Sep 2014 and all of a sudden it stopped working. Doing some further R&D we found that we are not able to add a new Auth Provider now. When we do that we get an error saying: Error autocreating Apex Class: Invalid type: Auth.UserData
When we try to edit and save the Handler of our existing Auth Provider (without making any changes) we get an error saying : Error: Compile Error: Invalid type: Auth.UserData at line 2 column 41
Seems like something got changed on that date, any one facing the similar issue?

Warning: curl_setopt() [function.curl-setopt]: Invalid curl configuration option in facebook_base.php

A week ago I started to notice a problem with the php sdk file - facebook_base.php
sometimes when connected facebook member visit the site and the auto-login trigger I get 2 errors and sometimes only the first error (that is why I used it in my problem title)+ the site shows up but without showing that user is connected.
after a refresh no error is shown and the site for connected member shows up.
I've tried new version of php API and also old ones that worked and still problem remained.
any ideas what can cause the problem?
UPDATE: similar problem spotted here: https://developers.facebook.com/bugs/207087046099691?browse=search_512a0e37e7ecf6136191651
this is the errors:
Warning: curl_setopt() [function.curl-setopt]: Invalid curl configuration option in /home/admin/domains/mydomain.com/public_html/includes/base_facebook.php on line 970
Warning: curl_setopt_array() [function.curl-setopt-array]: Array keys must be CURLOPT constants or equivalent integer values in /home/admin/domains/mydomain.com/public_html/includes/base_facebook.php on line 946