I mean, the source code looks a lot cleaner than WordPress, which is an incredibly sad statement.
Kill WordPress now.
Comment on 4chan hacked and taken offline. Hacker reopens /qa/ and leaks all admins emails.
KingThrillgore@lemmy.ml 4 days ago
I looked at some of the leaked source code and my god the code smells are so rotten its like they had a dead horse in the back for a while and its developed a stank like an Eric Andre skit.
It increasingly looks like nobody would maintain this bundle of wax besides under-experienced juniors who threw themselves at it, and apparently after moot sold it, it was never touched. It runs on an extremely old version of FreeBSD and PHP.
The fact this happened now as opposed to any time in the past decade is, I have no words.
I mean, the source code looks a lot cleaner than WordPress, which is an incredibly sad statement.
Kill WordPress now.
Also, the owner of Wordpress is allegedly a piece of s…
I wish people would stop censuring themselves on lemmy like they do for the other social medias. You can say shit, and a lot worse now that you aren’t asking a corpo for permission to speak.
Censoring*
Censure is like a harsh criticism
I think he did it because the actual WordPress guy (Matt Mullenweg) is really litigious.
Seriously, with views like his I don’t know how he ended up owning a place like tumblr
Shaaaaaving cream! Be nice and clean! Shave every day and you’ll always look keen!
Aaah, someone of culture, I see.
Stilton Cheese?
Satin undies?
Shit?
Satin undies?
Close. Soiled undies.
Ssssssandwiches
I’m unconvinced that it’s even possible to write clean code in a language as fucked-up as PHP.
Your opinion was correct like 10 years ago. PHP7 made a lot of fixes to many of the problems it had and PHP8 improved on it even more. And if you slap a framework on top of it, like laravel, PHP looks awesome.
Really though, it doesn’t.
I absolutely hate the way 4chan formats their HTML + PHP intermingling in views. That’s not to say WordPress doesn’t do this as well, but oh man in a much better, cleaner, and more sparingly way. The 4chan imageboard view Github -> 4chan is absolute chaos. Why this wasn’t rewritten is beyond me. That’s just the first thing I see as I peruse the source, I can’t imagine it gets much better from here.
but oh man in a much better, cleaner, and more sparingly way
I don’t think we’re looking at the same source code. The first thing I see in wp-activate.php:
function wpmu_activate_stylesheet() { ?> <style type="text/css"> .wp-activate-container { width: 90%; margin: 0 auto; } .wp-activate-container form { margin-top: 2em; } #submit, #key { width: 100%; font-size: 24px; box-sizing: border-box; } #language { margin-top: 0.5em; } .wp-activate-container .error { background: #f66; color: #333; } span.h3 { padding: 0 8px; font-size: 1.3em; font-weight: 600; } </style> <?php }
This isn’t better nor cleaner. This is a disaster. A function that stops PHP execution halfway-through, outputs some text and then restarts PHP execution? Hell, I’ve been in the PHP ecosystem for over a decade now and I didn’t even know this was possible and I wish that knowledge was still hidden from me.
Maybe I was wrong by saying that the 4chan source code is better than wordpress, fair. Maybe I should just say both are abominations, I will not judge which one is better and both should be discarded and forgotten.
This has been possible since the very beginning of PHP.
I won’t say if this is the best way now. I haven’t touch PHP in the last 2 decades.
I completely disagree.
Intermingling PHP and HTML is one of PHP strengths. The processing/executing difference you’re describing is almost always negligible due to how PHP is optimized (specifically for this kind of thing).
Seriously, compare this to the 4chan image board view linked above, we really aren’t looking at the same source code. In comparison, this is blocked, purposeful, together. It’s a single CSS block output all at once. On the otherhand, in the linked 4chan discussion board PHP file, it echos as strings, broken up by multiple conditionals, and difficult from an IDE perspective to tell where a block starts and where it ends (again due to it being echo’d in strings, and broken by conditionals). Trying to modify this blocked CSS is going to be wayyyyyyyyyyyyyyyyyyyy easier than trying to modify a bunch of printed HTML strings broken up by multiple nested conditionals. Plus it’s just straight-up easier to read and straight-forward to understand what the function does right away.
I can’t think of a single system that doesn’t “stop PHP executing” at some point to output HTML in some way. Maybe an app that dynamically pulls it’s views in through JS I guess.
I looked at some of the leaked source code
Where? I’d be interested in looking through it too
Link unfortunately dead by now…
here’s a new one: files.catbox.moe/d56ws8.7z
I can upload a new one. Ping me tomorrow when I’m awake again.
check some of the other chans and you will find a catbox.moe link to it.
Didn’t they get hacked pretty regularly in the past?
elrecoal19_1@lemmy.world 3 days ago
I wanna bet attackers probably thought it would be maintained by one or several of the most no-life, chronically-online users of the web… or that they would be waiting for an attack to get revenge in their typical unhinged way… and it turned out no one was maintaining or watching it at all XD
desktop_user@lemmy.blahaj.zone 3 days ago
security theater is a quite effective deterrent at times.
Clinicallydepressedpoochie@lemmy.world 3 days ago
Not even 4chaners thought it was worth protecting