r/ProgrammerHumor • • Oct 24 '26

Meme waitingForHtmlVulnerability

Post image
6.7k Upvotes

145 comments sorted by

34

u/saschaleib Oct 24 '26

Hot take: <br> should have never been a tag. An entity (maybe something like &br;) would have been the better choice.

10

u/chiya_coffee Oct 24 '26

Entities are for representing characters, like &amp; or &nbsp;. A line break in HTML is an element, not a character, which is why <br> is a tag.

25

u/arealuser100notfake Oct 24 '26

What a LLM way of tangentially responding with a lot of words while also not addressing the main point of the comment at all

8

u/Sock_Ninja Oct 24 '26

There wasn’t really a point given, just an opinion. The responder, LLM bot or otherwise, gave more justification than OP did.

Though I am curious to hear OP’s justification.

19

u/saschaleib Oct 24 '26

What does <br> that is different from inserting a line break? Something that is done pretty much everywhere else by inserting a newline character…

4

u/Sock_Ninja Oct 24 '26

That’s a fair argument.

4

u/rosuav Oct 24 '26

A line break in the HTML source is just whitespace and can be collapsed. A <br> element is going to remain as a line break in the output, regardless of the formatting of the source.

Whether it's correct to even HAVE a "line break in the output" concept is a separate question, but it can't be done with a \n character or any other whitespace.

2

u/Ilsor Oct 26 '26

<br> used to have an attribute called "clear". Entities can't have attributes.

As usual, the issue is a historical artifact that is now deprecated.

1

u/uuewy Oct 24 '26

flexbox

2

u/uuewy Oct 24 '26

wait actually I haven't done any frontend work in a while I'm dumb

2

u/saschaleib Oct 24 '26

<br> was already in the original HTML specs, but flexbox only came, like, last week or so ...

-6

u/chiya_coffee Oct 24 '26

english is not my native language, so i used claude to format it

11

u/Goncalerta Oct 24 '26

I'd personally prefer to read broken english than LLM-written reddit comments

4

u/EishLekker Oct 24 '26

You are absolutely right. Your original comment brought up a fair point, and I incorrectly responded using an LLM without justification.

6

u/Honeybadger2198 Oct 24 '26

And that's on me—

2

u/pint_o_paint Oct 25 '26

it's actually painful to read that. Make it stop

-6

u/CalebXiaYizhou Oct 24 '26

Are you mentally unwell?

1

u/chiya_coffee Oct 24 '26

Yes. How'd you know?

8

u/LieutenantNitwit Oct 24 '26

There is also the semantics. You know. That thing everyone has ignored since the dawn of time.

2

u/Designer_Storm8869 Oct 24 '26

The only semantic use of <br> is in poetry and song lyrics.

3

u/Nightmoon26 Oct 25 '26

Which is a perfectly valid thing for a page to contain

2

u/Acetius Oct 27 '26

100% agree. Outside of exceptional cases a <br/> is meaningless, lazy, and usually incorrect.

If you want to use it to represent a separation of content, just separate the damn content. Different ideas, contained in different tags.

If you want to use it to create visual space, use the stylesheet. HTML is for document structure, not hacky manual styling.

866

u/GoldenShackles Oct 24 '26

There are so many vulnerabilities in the web stack (HTML, CSS, JavaScript, even fonts) that this is why just about all browsers, starting back around 2008 with Internet Explorer 8 and the first Chrome betas, run web content in separate processes that have OS-level privilege isolation and sandboxing.

110

u/U_L_Uus Oct 24 '26

Were they running things in locality 4 or what?

99

u/evemeatay Oct 24 '26

We do not talk about the old ways, browser bars are a tool of the old witches

20

u/bubblebuddy44 Oct 25 '26

Yeah and last year someone found a sandbox breakout.

242

u/nonlogin Oct 24 '26 • Mindblown Popcorn

<script> tag allows arbitrary Javascript injection and execution. has not been fixed for years.

24

u/Lucario1492 Oct 25 '26

it's up to the developer to properly escape and sanitize inputs, cmon this is basic web 101.

1

u/Haunting-Army7843 Oct 26 '26

Fixed with CORS?

2

u/BobcatGamer Oct 27 '26

Fixed with CSP*

1

u/Haunting-Army7843 Oct 27 '26

Oh, you're right.

386

u/that_70_show_fan Oct 24 '26 • Bravo

I am gravitating towards simple HTML websites. Simple purpose-built websites is a lost art.

225

u/ciemnymetal Oct 24 '26 • Heartwarming

101

u/silverwing101 Oct 24 '26

58

u/frinkousCZ Oct 24 '26

65

u/RengieOcat Oct 24 '26

"This site doesn't support a secure connection"

19

u/Bernhard_NI Oct 24 '26

Aaaand?
You want to type in your credit card details or what?

17

u/RengieOcat Oct 24 '26

Settle down friend, this is ProgrammerHumor and it was funny

-12

u/Bernhard_NI Oct 24 '26

Sorry, but I juat don't see you add anything funny here.
I just get agitated easily from people pointing out useless things because they didn't really think about what it means what they discovered.

15

u/RengieOcat Oct 25 '26

Friendly suggestion that not everything deserves your emotional energy. Hope you have a good one.

-4

u/footsie Oct 24 '26

Well it's not really better if it's less secure.

8

u/Bernhard_NI Oct 24 '26

There is nothing to be secured here, and it's faster and simpler to open a connection without TLS. So it is in fact better.

There is even programming principle KISS (Keep it simple, stupid) which is always the way to go first.

4

u/Nightmoon26 Oct 25 '26

Until someone poisons the DNS to intercept the request and sends back something with a drive-by download

5

u/footsie Oct 24 '26

How's it faster if it won't even load before another click accepting an unsecured connection?

-2

u/Bernhard_NI Oct 24 '26

The warning about an unsecured connection is probably something from ios I guess? I dont get them on Android + Firefox and it's blazing fast. The confirmation has nothing to do with how efficient the connection and the needed resources are.

The site without tls is ever so slightly fast for me but not really worth mentioning tbh. More important is that it matches the design philosophy of that mother fucking website to keep it simple, stupid.

70

u/[deleted] Oct 25 '26

[removed] — view removed comment

1

u/cibule249 Oct 25 '26

Oh, I hate this one. Harder to read than the original (so much line-jumping, so few words on a line).

7

u/ashkanahmadi Oct 24 '26

My favorite thing about it is the HTML comments in the source code XD

5

u/RebronSplash60 Oct 25 '26

I love HTML source code comments in small hobby websites they're always the most unhinged gold.

1

u/whatisusb 29d ago

What comments? I only found one

19

u/Zwischenzug32 Oct 24 '26

Thank you for this.

It will be spread more now

8

u/Clickar Oct 24 '26

This reminds me of the brilliant high life super bowl commercial a few years back that was about 2 seconds long of the delivery guy simply saying "high life"

4

u/51CKS4DW0RLD Oct 24 '26

That loaded weirdly slowly

25

u/ConsequenceAny9726 Oct 24 '26

Good old Times. When your website consisted of a couple of html files. No PHP. No Javascript. Hell Not even <div> Just one big Table

8

u/Instatetragrammaton Oct 24 '26

cgi-bin/guestbook.pl as far as the eye could see.

PHP is old old, though, so asking for none of that means no webrings (which often used PHP to keep track of which part of the ring you were in) and no vBulletin either.

4

u/jdgordon Oct 24 '26

I can't decide if we would be better off if the web still ran on perl or not. Not even ai can decipher that madness

1

u/Nightmoon26 Oct 25 '26

Parts of it still do

12

u/Ok-Article-885 Oct 24 '26

First problems come with div. How would you center that shit

10

u/Far_Tap_488 Oct 25 '26

Its pretty easy, you just do marginright 150, marginleft 150, and width 800.

Fuk you if your screen size is different

6

u/DrDetectiveEsq Oct 24 '26

That's the neat part! You don't.

6

u/TerdSandwich Oct 24 '26

All-in-one website building platforms have eclipsed that market like a decade ago.

11

u/that_70_show_fan Oct 24 '26

Yes, that is my point.

4

u/rosuav Oct 24 '26

I've been pushing more and more people to build their web sites using Markdown. It's a good way to (try to) enforce separation of content and styling.

1

u/ProxyMuncher Oct 24 '26

If it wasn’t put together in adobe dreamworks I don’t want it anymore lol 

305

u/ismaelgo97 Oct 24 '26

I'm waiting for the CSS one

85

u/Zap_plays09 Oct 24 '26

Didn’t css had one like few months ago?

105

u/ismaelgo97 Oct 24 '26

I searched for it just after my comment, there is, but related to CSS being imported from a url, not just by CSS itself

2

u/ILikeLenexa Oct 25 '26

The biggest one I remember is using :visited and Javascript to upload your entire search history whenever you visited a website. 

57

u/Sianic12 Oct 24 '26

Can't wait to fix all my unstandardizedly centered divs

34

u/za72 Oct 24 '26

we don't have the technology to center divs yet, it's a capitalist myth

17

u/SpicySpaceBaguette Oct 24 '26

Divs are centered only by the will of the invisible hand of the market!

4

u/za72 Oct 24 '26

I'll ping Elon, he's got a guy

1

u/SpicySpaceBaguette Oct 24 '26

Divs are going to be centered, but at what cost.

1

u/za72 Oct 24 '26

3

u/SpicySpaceBaguette Oct 24 '26 • Bravo

I'll need 9,000 npm dependencies to have my div do that.

2

u/StrikingSun8563 Oct 24 '26

We can't center the divs because they keep taking the margins

1

u/za72 Oct 24 '26

what.. wtf... keep it on the DL mang

2

u/NoAdsDude Oct 25 '26
 /* Reject known stylesheet attack patterns */
  u/threat-detection (risk-level: elevated) {
    * {
      remote-resource-loading: blocked;
      attribute-exfiltration: disabled;
      injected-declarations: discard;
    }

8

u/4e_65_6f Oct 24 '26

That's a joke but paywalls have never held me back.

Oh so you've blocked the screen and you want money? display: none !important;

1

u/Major_LeeHungg Oct 24 '26

You can legit use tricks to write legit code with CSS.. Its hacky as all hell but you can absolutely abuse the layout engine to work as a runtime interpreter. 

0

u/fynjy1111 Oct 24 '26

Oh no what if someone could brake my flexboxes in Safari

32

u/Stummi Oct 25 '26

HTML parsing and rendering is hugely complex nowadays, and all browsers consist of literally millions of lines of code. It's more than likely that there are unknown vulnerabilities lurking.

9

u/kratz9 Oct 25 '26

I remember back in college, if you pasted huge text data into the Google search box in Firefox (back when the search was part of the page, not the address bar) , it would crash the video driver on the our lab computers. 

3

u/Nightmoon26 Oct 25 '26

I mean, there's at least one in XML... I don't know if the Billion Laughs attack can be implemented in HTML

3

u/ArjixGamer Oct 25 '26

Parsing is not that complex, I can do it in one afternoon out of memory w/o reading an rfc.

The hard part is truly, rendering

3

u/Stummi Oct 25 '26

I kinda doubt that. You are probably grossly underestimating the complexity of HTML to do such a statement. Even parsing is hard

2

u/ArjixGamer Oct 25 '26

No, it's just that I've done it thrice before.

Sure I may not have aimed for 100% compliance with the spec, but I could parse it, manipulate it via my fake DOM and serialize it.

The "hard" part is the edge cases, which aren't hard, you just have to know them before they hit you. (or just read the spec)

I think parsing CSS is way more complex.

1

u/Stummi Oct 25 '26

Just to be sure, we are talking about the HTML5 standard, right? Or did you mean one of the earlier HTML versions, or XHTML?

3

u/ArjixGamer Oct 25 '26

HTML5 yes

Writing a parser like jsoup or bs4 is not hard

26

u/xaomaw Oct 24 '26

<img src="Linkin_Park_-_In_The_End.mp3.exe">

49

u/Professional_Price89 Oct 24 '26

There are many cves about crafted html that cause browser sandbox escape. For server we have file inclusion using shtml, xxe. If we count AI a vector, then there are html prompt injection. For web crawler we have content type auto download.

37

u/frikilinux2 Oct 24 '26

Jokes aside parsing modern HTML and rendering the DOM with the css is so hard that there are like 4 or 5 modern implementations and most of the world uses 1. Even with all the browsers there are

16

u/frikilinux2 Oct 24 '26

And browsers have had several CVEs a week since basically forever

6

u/Narfi1 Oct 24 '26

Yeah HTML engines are insanely hard, ladybird is the only current project that seems to be going actually somewhere

5

u/Stratimus Oct 24 '26

And also for real, it is for the best that there are so few browser engines.

Those of you who didn’t live through the era of IE5-7 may not even be able to comprehend what it was like when even different versions of the same browser had wildly different implementations

16

u/Sw429 Oct 24 '26

There are pros and cons for sure, but I don't think that Google being central to the vast majority of web browsers is "for the best."

4

u/coriolis7 Oct 24 '26

Isn’t the whole reason why paid antivirus was a huge industry was because IE existed?

1

u/Sheerkal Oct 25 '26

I'm confused as to why you would think this. 

1

u/AsyncSyscall Oct 25 '26

It's not "hard", it's very well specified and documented, you can pretty much just copy-paste the spec into code. The problem is that the spec is huge, with lots of interconnected parts, legacy edge cases, and constantly changing to support new features. And real-world implementations eventually have to deviate from the spec algorithms for performance reasons.

1

u/frikilinux2 Oct 25 '26

Ok, so it's hard doing it correctly fast..

14

u/arealuser100notfake Oct 24 '26

BRAZIL MENTIONED

13

u/sarc-tastic Oct 24 '26

<br />

4

u/bikemandan Oct 24 '26

XHTML compliant 😎

9

u/Glum_Cheesecake9859 Oct 25 '26

Imagine the "marquee" tag being downfall of human civilization!

4

u/randomguy84321 Oct 25 '26

It was too dangerous. Thats why they had to deprecate it

8

u/Cabbagecrafting Oct 24 '26
<body src="https://www.youtube.com/watch?v=dQw4w9WgXcQ"></body>

14

u/HungryLikeDaW0lf Oct 24 '26

I still put in a <blink> tag just to see who’s using an old browser

1

u/Nightmoon26 Oct 25 '26

I mean... I worked with a QA team that used <marquee> tags to test for missing output sanitization

6

u/stilldebugging Oct 24 '26

If they ever find a vulnerability in nbsp;nbsp;nbsp, we are doomed.

4

u/LieutenantNitwit Oct 24 '26

help my <blink> tag stopped blinking hlp

4

u/stray_semicolon Oct 24 '26

The thing goes <brrrrr />

3

u/NiagaraThistle Oct 24 '26

Just realized how much i must be online when i see a post in Reddit with a screenshot of a entrepreneur I follow ion Twitter.

I'm going to go walk my dog and touch some grass.

3

u/Boobpocket Oct 25 '26

I think with llms being good at making simple html js websites there is no need for wordpress for the majority of websites that run wordpress.

2

u/mrbadface Oct 25 '26

Self hosting the CMS part is slightly annoying. Codex can run your WordPress which makes it less bad

2

u/NoAdsDude Oct 25 '26

For me it's all the layers involving PHP and a database. Front ends should never really need a database for normal content, even if it's under confusing layers of caching.

1

u/ddz1507 Oct 25 '26

But but but … my clients want to add or edit pages themselves like it’s PowerPoint because they want every page unique and different 😩
/s

2

u/fubbleskag Oct 24 '26

I choose to believe Nico chose <br> as a joke about Brotli

2

u/thisonehereone Oct 24 '26

I mean if you don't close your tags you're leaving them open to a vulnerability.

3

u/Ketooth Oct 25 '26

Jokes on you. Already found it.

Just press F12 and you can redesign the page.

Now you can just change any button with a pricetag to "Free"

Take that big corpo

2

u/Alpha_wolf_80 Oct 26 '26

Well... It's a feature in my page now. No buttons, or input, just plain ol dev tools. You are the dom now

1

u/Kadabrium Oct 24 '26

<br> </ap>

1

u/mattgen88 Oct 24 '26

We've had CVEs with HTML. A few were ACEs.

Just search internet explorer.

1

u/akazakou Oct 25 '26

Actually you need to use <br /> tags

1

u/Jet-Pack2 Oct 25 '26

These unescaped br tags are the worst!

1

u/AndiArbyte Oct 25 '26

Yes we are all very good Markup Language Programmers. /scnr

1

u/psyfregle Oct 25 '26

HTML vuln goes brrrr

1

u/Ksorkrax Oct 25 '26

It would be hilarious if <br> was actually an issue, that is breaks usually not being closed.

I use self-closing breaks on my website, so I could lean back and enjoy everybody else panicking.

1

u/podun Oct 26 '26

It's all fun and games until you have to recenter the divs

1

u/fredy31 Oct 26 '26

tbh it went through my mind this morning.

is there a future where php and other languages that interact with your server will get so busted we just return to simply having a full site in .html files?

That or a react site that never does a fetch of any kind.

1

u/remram Oct 27 '26

Wasn't rel="noopener" a patch for the HTML tag <a>?

1

u/muhkuller Oct 24 '26

How’d they break the non breaking spaces?

0

u/Single-Virus4935 Oct 24 '26

There Werke maaany HTML, CSS and JS vulnerabilities. Decades ago it it was a huge Problem because browser were patched often. Then major browsers started autopatching and the whole situation got much better. Imagine autopgrade for all webservers. Problem solved before anything made public.

1

u/AsyncSyscall Oct 25 '26

Things got better because major browsers standardized.

1

u/Single-Virus4935 Oct 26 '26

That's not the reason security is better. Development for the web is better because of standards but that has nothing to do with security. Patches can be rolled out faster.. 

0

u/SegretoBaccello 29d ago

A malicious website can inject arbitrary html code in your computer that can cause harm to the user when read. Especially if read out loud. 

Like for example, "<h1>AI and robots will take all our jobs</h1>"

1

u/ChOcOcOwCaKe Oct 24 '26

I am looking forward to fixing my <p> holes