Journaling on estrip is easy and free. sign up here

Zobar's Journal

zobar
My Podcast Link

10/24/2007 22:18 #41787

dorky geek question
Don't bother reading unless you give at least a quarter of a shit about XMLHttpRequest and HTTP authentication.

Here's a stupid geek trick. The correct login information for this is user="user", password="password". Give it the wrong password [it will say something like 401 Unauthorized, user="user", password="bogus"]. Then give it the right password and try again - it will keep sending the wrong password. This happens in both Firefox and IE; Safari has a slightly different bug.

Here's the sitch: I have an XMLHttpRequest going out to a password-protected resource. The credentials are supplied by the user and thus they are likely to be wrong some of the time. The script is designed to gracefully handle authentication failure - specifically, I want to avoid the crappy infinite HTTP authentication dialog box loop. I'd think that this issue would come up from time to time, but I guess it doesn't because this is really hairy:

XMLHttpRequest states "If authentication fails, user agents SHOULD prompt the users for credentials."

To work around this, Paul James suggests returning 401 Unauthorized without the mandatory WWW-Authenticate header. In theory, this tells the browser to stop trying and forget the password. The browser does, in fact, stop trying, but it also goes into a weird undefined state where it continues to issue the old [incorrect] password despite instruction to the contrary. [Safari instead puts up the dialog on the next request, even if credentials are provided.]

HTTP/1.1 states "If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information." - ie, reissue the same challenge to indicate to the browser that it should give up. As near as I can tell, not a single browser has ever done that.

HTTP/1.1 also gives us 403 Forbidden: "Authorization will not help and the request SHOULD NOT be repeated." This response has the same bizarre effects as 401 without WWW-Authenticate.

I'm actually kind of an AJAX newb, so ... does anyone have any recommendations?

- Z

paul - 10/25/07 00:12
I sent you an example of a surebert based ajax login that sues md5 to send the password and has color based feedback red=bad, green=good.

Hope it helps.
zobar - 10/24/07 22:56
Oh, the server-side source code is at :::link:::

- Z
james - 10/24/07 22:47
I recommend whiskey.
kookcity2000 - 10/24/07 22:26
in FF reloading the page doesn't help but changing the username ( to say, 'dude') and then back works

10/17/2007 13:00 #41688

more halloween fun
Category: fun
OK I admit it, I'm too cool for school. I don't like getting dressed up for Halloween. I think costume parties are lame. One year we sat at home with all the lights out so nobody would try to trickortreat us. And secretly I always thought that people who professed to like Halloween better than Christmas were just trying to fit in with the kids who don't fit in.

But this year it seems like there's a lot of fun stuff happening. Consider this, first off, a bump for "Nosferatu," below.

At the other end of the film spectrum, Regal Transit is going to be screening The Nightmare Before Christmas in 3-D this year. [I was initially surprised that they'd taken the expense of shooting in 3-D if they weren't going to distribute as 3-D ... but alas, this is yet another film digitally altered by ILM. Thank you George Lucas!]

::Download Flash Video::


[Woah, rerecompression. I hear Flash 9 is going to have native support for H.264?]

Is everyone familiar with fundamentalist Christian haunted houses? Alleyway Theatre bought a copy of the 'official' script and is presenting "Hell House Buffalo" upstairs of the costume store/bike shop at 745 Main. Todd Warfield (Reefer Madness), director: "I've changed very, very little of it. The challenge for us is to perform it sincerely." I've always been sort of morbidly curious of the spectacle, and now that I know the money is going to a good cause and I won't get evangelized at too much, I think we're going to go check it out. With local celebrities as Guest Satans, how can you go wrong?



- Z

jenks - 10/17/07 18:22
wow... I want to do all of those! nosferatu, nightmare, rollerderby... hell house maybe except that it will really piss me off... and costumes not so much.
drew - 10/17/07 17:46
One of the quotes was from Landover Baptist church, a satirical website (and a hilarious one at that). I hope they realized that, but the truth is that there is enough bad real stuff out there that they don't need to fake it.
janelle - 10/17/07 15:35
(e:DragonLady7), where am I going to buy my roller derby tickets now that New World Records is on Hertel? Does somewhere else on Elmwood sell them?
joshua - 10/17/07 15:30
Whats this?
dragonlady7 - 10/17/07 15:28
Hey man don't forget the rollergirls' goth prom on the 27th at Rainbow Rink. !!!!!
There will be hot girls in stupid revealing slut costumes and also rollerskating. HOW CAN YOU GO WRONG YOU CAN NOT GO WRONG.
janelle - 10/17/07 14:36
I will so be at the Hell Haunted House. I've heard it too and I'm a little curious. Although I'm not sure if I should support an interpretation of my faith that I thoroughly disagree with.
joshua - 10/17/07 14:28
Thats ok man. At the halloween party I don't plan on dressing up. I think my saudi prince idea is cool though.

10/12/2007 10:57 #41609

nosferatu
Category: movies
On January 16, 1926, the brand-new Shea's theater opened to great fanfare with a screening of "The King on Main Street." The baroque-decorated movie theater, seating 4,000 and incorporating imported Czech crystal chandeliers, was erected at a cost of $3 million [approximately $30 million today].

Five months later, the German silent film 'Nosferatu, eine Symphonie des Grauens [a Symphony of Horror]' made its American debut. Nosferatu paved new ground, being one of the first German Expressionist films and the first [albeit unauthorized] screen adaptation of Dracula. It's still pretty fucking creepy.

On Tue 30 Oct at 7:30p, Shea's will once again screen Nosferatu, with a musical accompaniment by the Devil Music Ensemble [admission $15.50]. I am going and so should you. That goes double for the non-(e:peeps) who read this, and triple for the Buffalo n00bz who have never been to Shea's.



Let me know who's in [non-peeps can email me], I'll run down to the box office & pick up tix.

- Z

james - 10/12/07 17:03
I have seen that film at least a dozen times. In Albany the Philip Glass orchestra played a score for it. Fucking awesome!
paul - 10/12/07 11:29
You can the three of us in (paul, matt, terry). How do you want me to pay you for the tickets?
museumchick - 10/12/07 11:01
It's very cool that they are doing that. I know the Riveria (sp?) was screening Nosferatu last year, but it would be even more fun to see it at Shea's.

10/10/2007 13:51 #41574

little bobby tables
Category: a series of tubes
There's no way I'm the only person here who thinks this is super funny.

[(e:dragonlady7)'s previous place of employment made a database system for nursing homes. They released an update and started getting complaints from their clients that they couldn't enter Irish patients. It took them a little while to figure out that the backend was tripping over O'Malley.]

- Z
uncutsaniflush - 10/11/07 02:26
The State of North Carolina's computer system could not handle a person with no middle name. Years ago, when I got my driver's license, I was told that I couldn't leave the middle initial field blank and that because I had no middle initial I had to write "NMI" on the application. I blame sloppy coding.
jim - 10/10/07 18:19
LOL I emailed that to everyone at work today. I love xkcd.
paul - 10/10/07 17:27
I found that quite hilarious. Ironically, I am teaching a little mini lesson on avoiding that problem with prepared statement tomorrow.

You guys aren't going to the dinner?
carolinian - 10/10/07 14:06
The database I inherited at work raises an error everytime someone searches for a record with an apostrophe. I can't change it right now because there's so much ugly SQL written by the previous guys that would break so totally if it were touched (and I have priorities even higher than fixing this issue, believe it or not).

10/06/2007 21:41 #41523

?
Category: a series of tubes


- Z
fellyconnelly - 10/07/07 12:11
definetely sounds like kate monster!

muppets rock...
james - 10/07/07 10:50
I was going to remark how awesome the Kate Pierson muppet was. But the wiki fun is freakin' great.
zobar - 10/07/07 08:55
The truth is even more awesome: according to Wikipedia, the voice actress for the Kate Pierson muppet is better known for her roles as Kate Monster and Lucy the Slut in Avenue Q.

Man, Michael Stipe is a freakish homunculus.

- Z
drew - 10/06/07 23:11
So that was really Natalie Merchant and not the best impersonator ever, right?
tinypliny - 10/06/07 22:32
I <3 that song even more now, hehe :D