Suche
Beiträge, die mit PHP getaggt sind
GitHub - splitbrain/meh: Meh... another comment system
Meh... another comment system. Contribute to splitbrain/meh development by creating an account on GitHub.GitHub
I live in #Sydney Australia and would be happy to work in-office, remote or hybrid.
Let me know of any opportunities, or pass this on to anyone else who might know of something? Thanks.
Original Post
I release a new version of Xdebug on Sunday, which fixes a few bugs. One of them is titled emoji character become diamond question marks. This bug turned out to be the same as var_dump does not output some Russian characters, which was originally reported a few days earlier but hadn't come with a decent enough reproducible case.
At first I dismissed this, as it's not unlikely that people get their character sets wrong, or mixed up.
But when I tested it, the following script really did not show the right result:
Instead of the expected:
Standard input code:3:string
'hello 👍' (length=10)
It showed:
Standard input code:3:string
'hello ���' (length=10)
The four bytes that should have made up the 👍 had turned into three.
Xdebug uses a function,
xdebug_xmlize
, to escape XML and XHTML-special characters such as "
, &
, and <
when it outputs strings of data.Its algorithm first calculates how much memory the resulting string would use by looping over the source characters, and adding the lengths of the escaped characters together. It uses a 256-entry table for this.
The first row shows that byte 0's escaped length will be
4
(for ) and the LF character's escaped length will be 5
(for ).The replacement strings are recorded in the table that follows. It only has place for
64
elements, as none of the bytes above byte-64 need to be escaped. You can see that because the xml_encode_count
table only has entries containing 1
after the fourth 16-element row.Then in a second iteration it loops over all the source characters again to construct the resulting output.
In this iteration, it checks if the destination length is 1, in which case it just copies the character over. If the destination length is not
1
, then it adds the number of characters that correspond to the destination character's length.The bug here was that the table for
xml_encode_count
, although it was defined as having 256 entries, only had 240 entries. I had missed to add the 16th line, so instead there were only 15 lines of 16 elements.And in C, that means that these missing elements were all set to . This meant that if there was a character in the source string where the byte value was larger or equal to hexadecimal
0xF0
(decimal: 240), the algorithm thought the replacement length of these characters would be . This then resulted in these characters to just be ignored, and not copied over into the destination string.For the 👍 character (hex:
0xF0 0x9F 0x91 0x8D
) that meant that its first byte (0xF0
) was not copied into the destination string. And that meant a broken UTF-8 character. Oops! 💩In Xdebug 3.4.2 this is now fixed, as I have added the 16th line to the table, with 16 more elements containing
1
.What I did find curious that it took nearly five years for something to report this issue, and with that, two in the same week!
xdebug/src/lib/var.c at 3.4.2 · xdebug/xdebug
Xdebug — Step Debugger and Debugging Aid for PHP. Contribute to xdebug/xdebug development by creating an account on GitHub.GitHub
Attackers are exploiting this flaw to run malicious code and install Cobalt Strike (yeah, that penetration testing tool – go figure 🙄). And that's when things get really nasty: password theft, lateral movement within the network... 🤬
The bottom line is this: vulnerabilities like these are like striking gold for cybercriminals. A quick update is absolutely essential! But what's even more critical? Regular, hands-on penetration tests! Automated tools often miss these types of vulnerabilities. ☝️
I'm curious to know: What steps do you take to secure your PHP applications? What penetration testing methods do you find most effective? 🤔
#Security #Pentesting #PHP
Original Post
I have been speaking at the 2025 edition of ConFoo in Montreal, the city with three seasons in as many days.
I have given two talks.
- In What's New in PHP 8.4? I explain the major new features of PHP's most recent release, 8.4.
- And in Better Debugging with Xdebug I explained some of Xdebug's new features, and also showed how to use some of these features to use the debugging in complicated situation. I also mentioned the Native Path Mappings feature that I am working on, as well as the initial ideas and plans for time travelling.
ConFoo Montreal 2025
Developer conference in Montreal, Canada with talks about PHP, .NET, Python, Node.js, JavaScript, etc.confoo.ca
Grav bietet Entwicklern viele Freiheiten – und verzichtet auf eine Datenbank. Außerdem ist das freie CMS schnell, unkompliziert und flexibel.
https://www.heise.de/ratgeber/Grav-Flexibles-Flat-File-CMS-als-WordPress-Alternative-10284454.html?wt_mc=sm.red.ho.mastodon.mastodon.md_beitraege.md_beitraege&utm_source=mastodon
#CMS #PHP #Webdesign #Webentwicklung #Wordpress #news
Jobs | aula
Du suchst einen Job mit Sinn? Hier findest du offene Stellen bei aula. Bewirb dich jetzt bei uns!aula gGmbH
I'm Dylan, a #fullstack #webdev from the Midwest, US. I like working with #js and #svelte so much that I wrote a book about #sveltekit! I've also worked extensively with #php and #WordPress but try to avoid the latter if I can.
I spend my days in the terminals of various #Linux machines and tweaking my #Vim config. I automate my #homelab with #ansible. I write about web dev on my #blog.
I enjoy #pcgaming and will occasionally #shitpost and boost #memes so brace yourself.
Deshalb habe ich darüber jetzt auch mal einen Blogpost geschrieben: https://steffo.blog/twig-ist-verdammt-cool/
Hoffe er gefällt euch!

#blog #php #sql #twig #programming
Twig ist verdammt cool!
Wie ich das UI des Huebi Charity Spendendashboards überarbeitet habe.SteffoSpieler (Steffo Blog)
(In our team... We do mostly e-commerce #dev )
https://phpstan.org/
I'm learning #phpstan ...
Any hints are more than welcomed!
If you are... How are you using it ?
Reading my colleague Maurits #blog post on ...
https://tqdev.com/2022-phpstan-find-bugs-without-writing-tests
for the past year i've been quietly working on building a software thingie that doesn't exist anymore. i've been building a software toolkit that's kinda like Visual Basic and HyperCard and Borland Delphi, designed for making tile-based 2d games.
i've been using it to build my own little goofy games, and improving on the drag'n'drop IDE as i figuring things out. it's not done yet, and has a long ways to go before it's ready for other people to start making their own little applications and games. think PICO-8 or ZZT if they had grown up on a steady diet of Windows 3.1 and GeoWorks Ensemble instead.
i'm really, really bad about polishing turds to infinity and never releasing them. to break that habit, i've built a mini-website for the IDE/Shareware Creation Kit. it's called Exigy, named like a bad 80s metal hair band or richard garriott game.
https://exigy.org
i'll be posting weekly blog/devlog updates there, so i don't irritate anyone with them on this account. there is an rss feed button at the top right if you hate my demonic php and css.
#shareware #ultima #php #blog #smolweb #zzt #indiedev #hypercard #vintageApple #exigy
🥳 Thanks to @soyuka for the implementation!
#php #documentation
I'm here hoping to find interesting #DIY #electronics and other nerdy projects, in addition to sharing my own stuff.
I've been fiddling with #esp32 microcontroller/WiFi modules for a while, and will probably post my share of esp32 related projects.
My primary programming languages are #php #cpp #javascript
I do #pcb design with #Kicad, simple 2D design with #qcad and 3D work in #freecad.
I write about some of my projects on my personal blog, https://espenandersen.no
My GitHub repository is found at https://github.com/espena
(Image from my garage workbench)