• 4 Posts
  • 312 Comments
Joined 1 year ago
cake
Cake day: June 30th, 2023

help-circle
  • No, you’re still misunderstanding what’s being done. ${server_service} is an injected string, the string is the whole contents of the file. That file is not stored locally on the server, except through being injected here(by a terraform file template). And no, printf won’t be any better than echo because its not format string, and I don’t want any formatting from printf applied to it.


  • I’m reading this and interpreting that line 27 of that script is

    And your interpretation is wrong. Line 27 is actuallly

    sudo echo "${server_service}" > /lib/systemd/system/server.service

    ${server_service} is read from the file I posted in the 2nd image. Since it was a test script I hadn’t bothered implementing any escaping tools, I wanted to make sure terraform allowed this first.





  • No, because neither of those are the inputs. The input was the systemd file in the image. The whole command was not printed in the error, only surrounding context. The single-quote was indicating the ending of that context(because it was the end of the line) printed by the error.

    The same thing was done with `)' on the first line of error



  • Sadly no, its injected with terraform templatefile, I already looked for a normal way to autoescape it, but from a brief look I couldn’t find one. I know there is a replace function that can take regex(RE2, which from my understanding prohibits * in lookbehinds)- but the simplest regex I could think of at nearly 6am for capturing only non-escaped quotes is /(?:^|[^\\])(?:(?:\\\\)+|[^\\]|^)(?'quote'")/gm. Though, I just realized if the quotes are escaped I would want to double escape them, so actually replacing all quotes with escaped quotes should be fine, also another limitation of this method is lines can’t have trailing \








  • The only people that think this are people obsessed with American media.

    David Cameron has some association with a pig.

    Modi has said some bizarre things about being a demigod.

    Macron lectured a kid for saying “How’s it going Manu?” instead of “How’s to going, Mr. President”

    Germany has a long history of very dumb policies, not unique to any specific politician. Such as banning protestors from chanting in any language other than English or German.

    And many other things. Politics have dumb things and dumb people everywhere*- it’s not uniquely American. American politics are just the most widely publicized internationally.


  • I think we’re going to have to agree to disagree. To use your example, if my neighbor was smoking in a place that it was stinking up my bedroom, and I asked them to stop doing it there, and they were like “nah I like it here” I’d consider them a huge asshole. Just do it over there not by my bedroom or something.

    Telling them they can’t smoke in their own home, or can’t ride public transit after smoking is ridiculous.

    One confounding issue here is that fireworks affect a pretty big area. The whole neighborhood is probably going to hear them.

    So does the smell of weed. That was a hypothetical example as luckily my neighbors don’t smoke, but my grandparents neighbors do, and it stinks up the car whenever I drive past that whole block- so it definitely is something that effects a large part of the neighborhood.

    I’ve known people who live out in the woods that are big on “I do what I want on my property!”

    I live in a city, I had an argument with my partner last night because he was against getting a fire alarm(not mandated in our country) because it could wake up the neighbors at night. Which I believe is a totally acceptable cost, but he does not.


  • Regardless, if one side was like “That’s really annoying to me, could you not please?” responding with “womp womp” is extremely rude and selfish.

    It is narcissistic of me to assume something annoying me should influence the behavior of strangers, and get them to stop doing something. A lot of things annoy me, and I’m all for criticizing and complaining about them(I do that a lot)- but someone not caring about my complaints and continuing to do what they enjoy is their right, and they aren’t a bad person for not caring that it annoys me.

    I’m sensitive to smells, we all recognize how unreasonable it would be for me to demand my neighbors don’t smoke weed because it bothers me at home, or I can smell cigarettes on the bus. Similarly, yes demanding people stop doing something they enjoy with their family because you have to wear headphones for a couple hours once or twice a year is something that I want to say “Womp womp” to