WWBN / AVideo-Encoder

Encoder Server for AVideo Platform Open-Source
https://platform.avideo.com
GNU Affero General Public License v3.0
152 stars 189 forks source link

MySQL Error when trying to switch from main site to encoder subdomain #543

Closed XDmToter closed 1 month ago

XDmToter commented 1 month ago

When I am logged in to the main site, and I select the "Encode video and audio" option, I am redirected to the encoder.example.com subdomain. This page shows a greyed out login form with a Processing... box. Reviewing the Console messages, I see https://encoder.example.com/login is returning a 500 error. I don't see any thing relevant in the Apache logs, but the PHP Log shows the following:

[11-Oct-2024 14:01:22 America/Detroit] PHP Fatal error:  Uncaught mysqli_sql_exception: Data too long for column 'pass' at row 1 in /home/encoder.example.com/public_html/objects/Object.php:168

2024-10-11_14-05

DanielnetoDotCom commented 1 month ago

can you please provide more from this log?

XDmToter commented 1 month ago
[11-Oct-2024 14:50:29 America/Detroit] logoff:: done session_id = vm60s0b9gj8rkve1gjvgmqbg1i
[11-Oct-2024 14:50:29 America/Detroit] https://demo.example.com/ == https://demo.example.com/
[11-Oct-2024 14:50:29 America/Detroit] login.json: Login::run
[11-Oct-2024 14:50:29 America/Detroit] Login::run (admin, ***, https://demo.example.com/, true)
[11-Oct-2024 14:50:29 America/Detroit] AVideoLog::DEBUG: getPasswordFromUserHashIfTheItIsValid: string not decrypted _user_hash_bUNsc0tZQSt3NlVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNWcCtPN0 SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 14:50:29 America/Detroit] AVideoLog::DEBUG: Password check Old encoded pass SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 14:50:29 America/Detroit] AVideoLog::DEBUG: Password check Old not found SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 14:50:29 America/Detroit] AVideoLog::DEBUG: getPasswordFromUserHashIfTheItIsValid: string not decrypted _user_hash_bUNsc0tZQSt3NlVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNWcCtPN0 SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 14:50:29 America/Detroit] AVideoLog::DEBUG: Password check Old not encoded pass SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 14:50:29 America/Detroit] AVideoLog::DEBUG: Password check Old not found SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 14:50:29 America/Detroit] AVideoLog::DEBUG: loginFromRequest NOT FOUND admin SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 18:50:29 Africa/Abidjan] AVideoLog::DEBUG: login.json.php user found [admin] SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 18:50:29 Africa/Abidjan] AVideoLog::DEBUG: User::find line= 1647 SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 18:50:29 Africa/Abidjan] AVideoLog::DEBUG: User:login finish with success users_id= 1  IP=208.122.217.227 SCRIPT_NAME: /objects/login.json.php
[11-Oct-2024 14:50:29 America/Detroit] Login::run got an object
[11-Oct-2024 14:50:29 America/Detroit] createIfNotExists:: admin
[11-Oct-2024 14:50:29 America/Detroit] Verification Start https://demo.example.com/
[11-Oct-2024 14:50:29 America/Detroit] Verification Creating the Cache https://demo.example.com/
[11-Oct-2024 14:50:29 America/Detroit] Verification Response (https://search.avideo.com/verify.php?url=https%3A%2F%2Fdemo.example.com%2F): {"msg":["https:\/\/demo.example.com\/ Site verified"],"isPrivate":false,"verified":true,"status":"a"}
[11-Oct-2024 14:50:29 America/Detroit] PHP Fatal error:  Uncaught mysqli_sql_exception: Data too long for column 'pass' at row 1 in /home/httpd/html/encoder.demo.example.com/public_html/objects/Object.php:168
Stack trace:
#0 /home/httpd/html/encoder.demo.example.com/public_html/objects/Object.php(168): mysqli->query()
#1 /home/httpd/html/encoder.demo.example.com/public_html/objects/Login.php(91): ObjectYPT->save()
#2 /home/httpd/html/encoder.demo.example.com/public_html/objects/login.json.php(15): Login::run()
#3 {main}
  thrown in /home/httpd/html/encoder.demo.example.com/public_html/objects/Object.php on line 168
DanielnetoDotCom commented 1 month ago

Make a git pull in the encoder and try this update

DanielnetoDotCom commented 1 month ago

But, this will avoid this error, but I guess you should reduce the password, maybe other errors appear.

currently the encoder can handle passwords up to 255 chars, and your password seems to be bigger than that.

XDmToter commented 1 month ago

Nope. My password is only 16 characters. I'll try the update and see what happens.

DanielnetoDotCom commented 1 month ago

Update and check, but for some reason your pass seems to be longer than that

image

XDmToter commented 1 month ago

That password box on the encoder site was auto-populated by something. I don't have the password saved in my browser, so I'm not sure what was populating that. I am happy to report that all is working well after the update though.