News for hackers. Stuff that matters.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by HKH2 on Friday July 30, 2021 @08:33AM (#28007259)
So YouTube is setting environment variables for people who don't do shell quoting. Next they can add "&reboot" to all their URLs.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by coldpie on Friday July 30, 2021 @09:40AM (#28007824)
What? Look at the URL in your browser right now. It has a bunch of x=y parameters. That's how URLs work.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by Sophira on Friday July 30, 2021 @04:12PM (#28011880)
The parent comment is talking about what would happen if, for example, you typed this in bash to try to download a video:

$ youtube-dl https://www.youtube.com/watch?v=dQw4w9WgXcQ&pp=sAQA

In this case, bash would interpret it as "run youtube-dl in the background with the parameter 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', then execute the command 'pp=sAQA' to set the 'pp' variable".

The comment is joking that if YouTube decided to replace "pp=sAWA" with "reboot", they could get a lot of people to accidentally reboot their machines instead because they didn't quote the URL.

Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by chrisseaton on Friday July 30, 2021 @08:28PM (#28014043)
That was always a problem if you just copy-and-pasted URLs into your terminal. You need to quote them. It's not new.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by villgax on Saturday July 31, 2021 @01:58AM (#28015674)
It used to work in bash but doesn't in zsh
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by PaulDavisThe1st on Friday July 30, 2021 @09:38AM (#28007807)
....&foo=BAR

sets a shell variable, not an environment variable. The value of $foo will not be available to shell-forked processes.

Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by hobos_delight on Friday July 30, 2021 @09:00AM (#28007453)
This is how you append query params to a url - nothing to do with the shell.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by tomerv on Friday July 30, 2021 @09:08AM (#28007524)
The GP complained about shell quoting.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by judge2020 on Friday July 30, 2021 @09:25AM (#28007692)
I doubt it is YouTube's intention to require people start quote URLs in shell, though.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by dvirsky on Friday July 30, 2021 @08:05PM (#28013933)
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs? by danmur on Saturday July 31, 2021 @07:32AM (#28017168)
That's hilarious