SUSE / machinery

A systems management toolkit for Linux
GNU General Public License v3.0
158 stars 32 forks source link

Incomplete URL encoding for System Descriptions on Landing Page #1748

Closed svollath closed 8 years ago

svollath commented 8 years ago

While it is possible to "show" or "show --html" a description named "ä%e+iö:ü", the respective link on the Landing Page will lead to a "Bad Request: bad URI `/%C3%A4%e+i%C3%B6:%C3%BC'."

"machinery show --html ä%e+iö:ü" creates a working URL: "http://127.0.0.1:7585/%C3%A4%25e%2Bi%C3%B6%3A%C3%BC"

while the Landing Page holds a broken URL: "http://127.0.01:7585/%C3%A4%e+i%C3%B6:%C3%BC"

... the first "%" or "+" most likely causing this, since a link to a description named e.g. "lala:la2" even works on the landing page.

svollath commented 8 years ago

At least Tim was right, and I wouldn't be able to create a description name "ä%e+iö:ü" with machinery:

'# machinery inspect -s os --name ä%e+iö:ü localhost' Inspecting localhost for os... Inspecting os... System description name 'ä%e+iö:ü' is invalid. Only 'a-zA-Z0-9_:.-' are valid characters and a dot is not allowed at the begginning.

However, the URL is encoded correct with "machinery show --html ä%e+iö:ü" - but per definition the issue isn't valid.

cornelius commented 8 years ago

As it's not possible to create this situation with Machinery, I don't think it's worth the effort to prevent the user from creating it manually.