BenBE's humble thoughts Thoughts the world doesn't need yet …

30.01.2009

PHP als SSL-Client

Filed under: Server — Schlagwörter: , , , , , , , — BenBE @ 22:20:17

Es ist ja nicht so, als ob PHP nichts kann, ganz im Gegenteil: PHP kann alles, nur nicht das, was man brauch – naja, oder zumindest nicht ausreichend einfach. Da wäre z.B. die Geschichte mit der sicheren Kommunikation über SSL/TLS. PHP selber muss, wenn es auf einem Server läuft, SSL nicht weiter beherrschen wie das Auslesen der Umgebungsvariablen, die vom Apache gesetzt werden. Möchte man nun aber von einem fremden Server via PHP ein paar Daten sicher abfragen oder übertragen bekommen, darf man eine Krücke nach der anderen benutzen. (more…)

Flattr this!

17.01.2009

Probably only few new features this time

Filed under: GeSHi — BenBE @ 19:01:44

How time passes by. It’s already middle of January and there hasn’t been much work on GeSHi yet. Not that there was no time (which wasn’t, but that’s some other story) but there has only been little input so far thus no real changes were needed.

Well, actually there was some input in the form of some mails that pointed out some glitches I somehow missed in the previous release. First of all there was some kinda ugly bug that I got informed about multiple times: In the AutoIt language file there was a whole keyword group that made the parser go berserk. I couldn’t quite find the reason for this as the parser normally should allow underscores as first symbols of a keyword (if they aren’t set as symbols), but who knows. A short parser control that matches the first underscore if not preceeded by some alphanumeric character and the removal of the underscore from the actual keyword group did the job. And since this ment some major reformatting of the list: Don’t mention AutoIt anytime soon: I hate this file for now!

The other problems were minor ones. All dialects of C and C++ should now properly support multiline-continued preprocessor directives. This isn’t quite a new feature, but some point I missed, when I initially added multiline continuation in C for single line comments in some of the previous releases.

And as we already are at missing stuff: In the PHP language file I missed to escape the backslash properly, thus double-quoted strings ending in an escaped backslash weren’t properly ended as the ending double-quote was escaped instead of the escaped backslash.

So only keeps waiting for some more input and feedback for the remaining time till the release which probably will be in mid-February. Until then I’m not sure if I can invest a lot of time since exams at University call for attention. But well, time for integrating your patches and language files will of course be enough. Overall 1.0.8.3 will be mostly a bugfix release. IDK if I will issue some Release Candidates beforehand as there barely are changes requiring one.

So let’s see!

Flattr this!

13.01.2009

Mehr RAM für mein Notebook

Filed under: Allgemein — Schlagwörter: , , — BenBE @ 14:13:55

Für meine tägliche Arbeit nutz ich wenn ich unterwegs bin ein kleines LG-Notebook (naja, was man vor knapp zwei Jahren halt 15-zollig, 4:3 und entspiegelt für kleines Geld bekommen hat) und war bisher soweit auch ganz zufrieden. Einzig das ewige Swappen mit dem ab Werk verbauten 1GB-Riegel hat schon länger arg beim Arbeiten behindert. Also ging die Suche nach einer Möglichkeit zum Aufrüsten los. (more…)

Flattr this!

09.01.2009

Highlighting Perl in all its oddity

Filed under: GeSHi — Schlagwörter: , — BenBE @ 00:02:34

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /var/www/virtual/benny-baumann.de/blog/htdocs/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /var/www/virtual/benny-baumann.de/blog/htdocs/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Following up on a discussion on the GeSHi-devel mailing list I got some interesting testcases for testing Perl in all its oddity.

So lets get things startet: Open up the testcase, and see: The CSS is not fully precise on some stuff (some classes in GeSHi can be used for different things like .co5 for perl is used for predefined variables). So I did a quick editing of the CSS stylesheet with the Web Developer Toolbar to mark everything that was of specific classes (as expected) in a different color than white to see if it actually is highlighted (which most stuff was).

Adding the missing stuff into the language file I got an updated version for Perl that can be found as revision 1975 in the GeSHi SVN repository for testing. Things I didn’t include there are file descriptors as they should already be highlighted (even if <> and <test> are marked as different things.

But in one thing the testcase wasn’t right: Heredocs As well as Regular expressions are supported by GeSHi, see:

$test = <<HEREIAM;
Some text to show this is a heredoc part
HEREIAM;
$match =~ /te[sx]t/g;
$replace =~ s/x/s/i;

Just to be complete on this. Oh, and the

< <

bug is a problem with my WordPress. The demo page does the Heredoc correctly, for those that don’t believe me 😉

Now I’m only lacking this little testcase as a file for inclusion into the Code Repository of GeSHi and I can declare this „done“ …

Update: Revision 1977 contains some important updates on the rev1975\r1974 version of this file: I missed some things due to some issue I had with encoding $ inside of regexps (I missed the escapes PHP needed inside the string). I also added the few remaining cases that the previous version didn’t yet.

What will not be highlighted correctly are bacreferences to numbers (and I thought C was odd …) and nested Heredocs (i.e. Heredocs with two or more starters on one line).

But given the current state this should somewhat resemble most of what even most insane Perl programmers need when puking their code …

Flattr this!

01.01.2009

Firefox und SSL

Filed under: Software — Schlagwörter: , , , , , , — BenBE @ 21:42:27

Erstmal hoffe ich, dass alle meine LEser gut in’s neue Jahr 1984v2 gekommen sind und man sich nun nach den etwas stressigen letzten Tagen des alten Jahres gut erholt hat. Aber halt! Da war ja der 25C3 mit einer ganzen Reihe interessanter Vorträge zum Thema Sicherheit, u.a. in Bezug auf verschiedene Protokolle wie DNS und TCP, aber auch in Bezug auf eine ganze Reihe neuer Angriffe, die wie eigentlich in jedem Jahr, auf dem Kongress vorgestellt wurden, darunter Cold Boot Attacks gegen den Speicher frisch ausgeschalteter Computer, Angriffe gegen Web Services, aber auch Angriffe gegen verschlüsselte PHP-Anwendungen.

Nein, ich möchte jetzt nicht den gesamten Kongress im Detail wiedergeben – zu dem ich ohnehin aus verschiedenen Gründen leider nicht fahren konnte: ich möchtee eher ein anderes Problem hervorheben, wo der Kongress einmal mehr überaus deutlich gezeigt hat, dass ein Umdenken und eine alternative Lösung mehr als notwendig ist, da die vorhandenen Mittel auf lange Sicht nicht weiter vor einer Katastrophe schützen können, wie der Vortrag zu SSL und der Erstellung eines gültig-unterschriebenen CA-Zertifikates gezeigt haben. (more…)

Flattr this!

Powered by WordPress