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

Virtualmin save_bkey.cgi script is called with wrong encoding type #959

Closed
jcameron opened this issue Dec 22, 2017 · 3 comments
Closed

Virtualmin save_bkey.cgi script is called with wrong encoding type #959

jcameron opened this issue Dec 22, 2017 · 3 comments

Comments

@jcameron
Copy link
Collaborator

This was detected in https://www.virtualmin.com/node/54740

Basically, it looks like when the form on edit_bkey.cgi uses the form-data encoding type, save_bkey.cgi is called with no input. The actual URL that's requested is :

104.132.1.98 - root [21/Dec/2017:17:03:06 -0800] "GET /virtual-server/pro/save_bkey.cgi/key.txt?[object%20FormData] HTTP/1.1" 200 2683
@iliajie
Copy link
Collaborator

iliajie commented Dec 22, 2017

Hi, Jamie, thanks for reporting!

It happens because of unconventional form's action link, which links to something about save_bkey.cgi/key.txt.

I have made a patch to capture this kind of links for all calls.

I have noticed that it takes literately forever to create a key and fails in most cases for me with an error:

Failed to create backup key : Key generation failed : Key generation timed out, possibly due to lack of entropy.

It happens in Gray Theme as well.

Not sure why it's happening. I think it should be checked. I ran it on my VM (CentOS 7).


Surely we need to return the progressive output to the user on this page, telling what's going on.

Jamie, make sure to let me know, in case you decide to make this part of the module progressive. For the future, I need always to know, when you add progressive output for certain pages. It has to be reflected on the theme as well to work correctly.

@iliajie iliajie closed this as completed Dec 22, 2017
@jcameron
Copy link
Collaborator Author

Yeah, key generation can be slow (perhaps infinitely) on VMs due to lack of entropy. This is unfortunately un-avoidable :-(

@iliajie
Copy link
Collaborator

iliajie commented Dec 22, 2017

Sure, no problem.

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

No branches or pull requests

2 participants