Welcome to our new series of strange bugs. Today we’ve got a brand new candidate called emptyness which is a really great star on the floor of PHP bugs. I was being stumbled upon this one by Thomas Puls who mailed me about the fact, that if you highlight a single 0 with GeSHi, it magically disappears.
What does it take to get Debian to update a package?
More than two years, about 50 mails, 10 people from 3 different Debian-related IRC channels, 4 bugs filed by upstream and 2 security-related issues reported to the Security team … Sound’s legit IMHO.
Being way overdue, and not only because some other projects
askednagged for a release, I’m really pleased I finally had everything together last week so I could do the release of GeSHi 184.108.40.206. Besides the 18 new language files there are also two important bugfixes addressing problems in contrib scripts.
Well yeah, after some nasty person dropped a link about why programmers are so bad at programming I somehow got to have a look at the Rosetta Code project’s site detailling this task and found (not to my surprise) that noone had solved that task — yet! So I sat down and implemented it. Usually this task should take you only about a few minutes but since I hardly ever programm anything in BrainFuck it took me roughly 45 minutes to complete. But well: Here’s the result (Beware: Ugly code)!
Because of a recent attack against SourceForge all the GeSHi releases will be available signed to allow for verification of authenticity of the released files.
After a somewhat longer period of silence from my side, due to some vacation I took, I’m proud to announce that there have quite some changes for the next release of GeSHi accumulated in the SVN trunk which will be the basis for the next release of GeSHi. As most of you might already have guessed the next release will be version 220.127.116.11, which is the first version of GeSHi in 2011 and also the first version since half a year. So what’s new with this version?
Well, the question is a bit complicated to answer, so let me split this into three parts. The first of which is all the changes to the parser of GeSHi itself. One of the changes here is a change of the handling of dashes when creating regular expressions which are used internally for GeSHi to speed up the highlighting of keywords. The problem here was that in some occasions dashes were left unescaped as part of the regexp and thus got a special meaning within character groups causing unpredictable behaviour. Although this couldn’t be used for malicious activity it was an annoying side effect causing GeSHi to crash when encountering language files which used dashes in their keywords. COBOL is one of them, Scheme another.
But let’s stay with the internal changes for another moment: There was another bug this time which affected e.g. PHP, but actually quite a bunch of other languages too. The reason for this bug is a bit more complicated to explain though, as it involves some of the internas and the precautions of GeSHi to avoid XSS attacks by the code that should be highlighted. When you look at the code sample provided there you will notice the semicolon before the offending if, right? Now, as we all know, GeSHi tries to output HTML code. This fact is important here because the semicolon – even though it doesn’t need escaping is crucial for valid HTML as it terminates escape sequences and therefore needs special treatment as we can’t simply go ahead and markup every ; we find: It might be part of an escape sequence. Luckily GeSHi works around the problem here and escapes two characters not which their HTML entity, but with something else: | with <PIPE> and – you guessed ; with <SEMI>, avoiding this disambiguity this way. Now for the problem: The default boundary checks for keywords didn’t take these replacements into account and thus hadn’t had < and > in them and therefore did NEVER match any keyword accompanied by one of those two characters. Literal < and > BTW are escaped beforehand and thus appear as < and > in the source when checking boundaries. Coming with this release also < and > are part of the default lists of characters allowed as boundary of a word and thus enabling the proper highlighting of the sample code in the bug report linked above.
The third issue regarding the parser is not a change of the parser itself, but rather a convenience check added to the language file checking script which didn’t verify filenames properly and thus sometimes returned invalid filenames to be checked. This bug didn’t allow for code execution, but rather produced annoying error messages when some temporary files clobbered up your language file directory.
After we’re now done with the changes to the parser let’s discuss the changes to existing language file since we have quite a few already and I’m sure I did miss even some more in the depths of my inbox! So here we go: Users of Algol68 might like the greatly improved language file by Neville Dempsey which didn’t make it into the previous release since there were some issues I needed feedback on. But even having the language file in a bit later should be early enough for you to enjoy.
I know it’s about two months now, but I finally got around to do the last steps that were missing for GeSHi 18.104.22.168: Packaging it