• 4 Posts
  • 120 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 \








  • That was why the conversation was Congress, the People’s will indirectly, or a popular vote directly.

    Source?

    The people who wrote the document knew an appointment system could not and would not stand.

    But they also knew some states would prefer it and may be reluctant to ratify if a popular vote were required.

    Throwing it to the state legislatures to officially decide was the compromise.

    How is that a compromise? Unless you mean because it gave the states the authority, which yk, is what I said.

    I’m not even sure why you’re arguing this? Are you trying to argue that we should appoint electors now?

    You said “At no point did the founders want the state interests to vote for president. It was either the people directly or the people indirectly.”

    Which is untrue. And again, the electoral college was intentionally designed to be a middle ground between “popular interest” and “state interest”- you falsely said “You’re thinking of the 3/5ths and the large state / small state compromises.”- which is not what I was thinking of.

    The number of electors states were given was guaranteed to be 4 + population. The 4 constant was for the same reason as the senate 2 constant, to fairly represent all states, + population was for the same reason as the house- to represent the population of the country as a whole.




  • Heres my example from another comment:

    Ie, splitting a city(with a rural area in a crescent shape around it) into two equal districts down the middle each with a sizable urban and rural population(say this gave 45% rural, 55% urban in each of these districts which is pretty reasonable), vs giving the city its own district and the rural area its own district. The first option may be more “compact” but in my opinion would lead to unfair under representation of the rural voters- same as if the demographics were swapped. Districts are supposed to “represent a community” not just be compact.