Week 11 of the Summer of Code brought the ending to a summer long problem, the MT WSSE authentication issue. The MT importer is now officially a reality, and I am happy to say I will be able to complete my original set goals.
Fixing My MT WSSE Authentication Problem
Earlier this week I received a great deal of help from two Movable Type developers, Mark Paschal and Byrne Reese. After finding the source of my issue, Mark took a closer look at the specific problem. His diagnosis: I had a bug in my end of the WSSE authentication.
After spending numerous weeks working with the Atom Protocol Exerciser, I came to rely on it as a crutch. Whenever my Atom retrieval failed, the APE always succeeded. Well, that turned out to be a bad habit. Movable Type’s WSSE authentication was implemented differently than the APE, and thus the APE was useless against it. So, when I ran into a problem with my code and the APE didn’t work either, I assumed the issue was on MT’s end. That was simply not the case.
After Marked looked at my code, he informed me my nonces were repeating. The AtomPub library I had be using did not rebuild the nonce after each sequential request, and therefore failed to authenticate on the second Atom request, the list of posts. After I added a snippet of code Mark suggested, everything started authenticating perfectly.
So, this entire issue came down to one line of code on my end, and it could have been completely avoided had a took a closer look at my end of the code. Had I approached the problem differently, I am confident I would have found the repeating nonces, but I didn’t even look in that direction. I will definitely be taking this programming lesson with me into future projects.
The Status of the Movable Type Importer
Now that everything is authenticating, the MT importer is not far behind. I’m currently putting the finishing touches on some changes I had to make that differed from TypePad. Once those changes have been made, the importer should be working fine. I expect the MT importer to be completed over the next couple of days, and I should finally have everything submitted to WordPress’ Trac.

5 Comments
Don’t be too hard on yourself Ronnie. At work I had a major issue, even showed my source code to my boss who couldn’t spot the problem. Keep in mind this project is maybe 700 or so lines of code that had a lot of crap in it.
Since its on a production server (non-public though), Red Hat thought it should disable PHP warnings/errors. I never noticed that in the past actually, a recent update must had caused it since I could had sworn I got errors in the past.
I guess I should had read the log files since thats where errors were being logged instead of on-screen, but to make a long story short, I tuned on errors and lo and behold the error was found on line 85 with a missing semicolon!
yes, I absolutely agree with you, I am working on it too, check out my site to learn more, thanks.
Cool idea. I happen to think it’s one of the best out there, but maybe that’s just me. Thanks for your interesting ideas
I’d imagine by now this project is complete so care to elaborate how it all ended?
Yes, I’ve been meaning to write a conclusion post. Unfortunately I’ve been insanely busy with school, but I’ll try to get to it this weekend.
Post a Comment