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

For "stack add/set" attribute commands, reject attributes or values that would cause kickstart to fail #11

Open
gregorybruno opened this issue Jun 27, 2015 · 4 comments

Comments

@gregorybruno
Copy link
Contributor

No description provided.

@gregorybruno gregorybruno self-assigned this Jun 27, 2015
@gregorybruno gregorybruno changed the title For "stack add/set" attribute commands, reject attributes or values that would cause salt to fail For "stack add/set" attribute commands, reject attributes or values that would cause kickstart to fail Sep 10, 2015
@jlkaiser
Copy link

Okay, so I can't make it fail with special characters.

I can make it fail with an attribute that has the entire id_rsa key in it, but a backend install only sort of fails.

It pops you to a screen like this:

backend-0-0

Click okay and then the node installs and the ssh key is where it's supposed to be.

If you put an xml entity in as an attribute, like this:

stack set attr attr=testattr value='ipaddr = &hostaddr;'

You'll get:

ipaddr = &hostaddr;

not

ipaddr = 192.168.55.55

because the parser only parses the xml the first time around.

So this is more like under the heading of: "Don't do that." The question is whether or not it's worth trying to catch a "don't do that."

@jlkaiser
Copy link

jlkaiser commented Aug 2, 2016

I take it back. I made it fail about three months after I said I couldn't make it fail. Put a python dict in as an attribute, it let's you. Then use the attribute, it will barf.

Thanks,

Joe

@gregorybruno
Copy link
Contributor Author

Try calling saxutils.escape(string) and see if that fixes it.

@bsanders
Copy link
Contributor

I actually think this works in HEAD now. A few attributes are python types that are string-ified. Marking for testing.

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

No branches or pull requests

4 participants