Skip to content
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

dashboard database issues #140

Open
tjmeyer opened this issue Oct 23, 2018 · 2 comments
Open

dashboard database issues #140

tjmeyer opened this issue Oct 23, 2018 · 2 comments
Labels

Comments

@tjmeyer
Copy link

tjmeyer commented Oct 23, 2018

After installing the dashboard successfully I'm finding that I can't add clients and adding hypervisors is successful, but returns strange feedback like:
Field 'clientid' doesn't have a default value

Here is the tail of my database access log:
10.0.0.51 - - [23/Oct/2018:16:29:19 -0700] "GET /kvm-vdi/inc/img/logo.png HTTP/1.1" 200 12037 "http://10.0.0.51/kvm-vdi/dashboard.php?username=test&password=bpQzgVgK0G" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:29:23 -0700] "GET /kvm-vdi/list_hypervisors.php HTTP/1.1" 200 1133 "http://10.0.0.51/kvm-vdi/dashboard.php?username=test&password=bpQzgVgK0G" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:29:23 -0700] "GET /kvm-vdi/inc/x-editable/bootstrap3-editable/js/bootstrap-editable.js HTTP/1.1" 200 51690 "http://10.0.0.51/kvm-vdi/dashboard.php?username=test&password=bpQzgVgK0G" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:29:25 -0700] "GET /kvm-vdi/inc/x-editable/bootstrap3-editable/img/loading.gif HTTP/1.1" 200 2134 "http://10.0.0.51/kvm-vdi/inc/x-editable/bootstrap3-editable/css/bootstrap-editable.css" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:29:25 -0700] "GET /kvm-vdi/inc/x-editable/bootstrap3-editable/img/clear.png HTTP/1.1" 200 793 "http://10.0.0.51/kvm-vdi/inc/x-editable/bootstrap3-editable/css/bootstrap-editable.css" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:29:33 -0700] "GET /kvm-vdi/new_vm.php HTTP/1.1" 200 3072 "http://10.0.0.51/kvm-vdi/dashboard.php?username=test&password=bpQzgVgK0G" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:29:40 -0700] "GET /kvm-vdi/add_credential.php?credential_type=client HTTP/1.1" 200 941 "http://10.0.0.51/kvm-vdi/dashboard.php?username=test&password=bpQzgVgK0G" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:29:58 -0700] "GET /kvm-vdi/dashboard.php?username=tester&password=asdf HTTP/1.1" 200 3128 "http://10.0.0.51/kvm-vdi/dashboard.php?username=test&password=bpQzgVgK0G" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:29:58 -0700] "GET /kvm-vdi/inc/infrastructure/KVM/DrawTable.php HTTP/1.1" 200 358 "http://10.0.0.51/kvm-vdi/dashboard.php?username=tester&password=asdf" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" 10.0.0.51 - - [23/Oct/2018:16:30:00 -0700] "GET /kvm-vdi/inc/infrastructure/KVM/DrawTable.php HTTP/1.1" 200 359 "http://10.0.0.51/kvm-vdi/dashboard.php?username=tester&password=asdf" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0"

I've confirmed that the database user has all privileges, if it didn't the dashboard would not have been able to generate the tables. Any ideas what's going on?

I'm running on ubuntu 18.04.1.

-T

@Seitanas
Copy link
Owner

Looks odd.
You should never see username and password in log files.
It seems that somehow your installation uses GET instead of POST calls.

@tjmeyer
Copy link
Author

tjmeyer commented Oct 26, 2018

How strange. It appears to intentionally use GET. Could the browser cause something like that? Any idea what could be causing this? I tried installing again on centos 7.5 and Ubuntu 18.04.1 and ran into the same issues. To work around it I altered all columns with default "null" values to empty strings or 0. In MySQL 10.3 a default null column will not allow an insert if a value is omitted in the statement. This solved the immediate issue. I think the code my need some updating for newer releases of MariaDB and php.
And not to worry, the passwords were intentionally dummy passwords in the logs.
Great work on this by the way!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants