edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [edbrowse-dev] If you Give a Mouse an Unsubscribe Link
@ 2019-07-23 20:53 Karl Dahlke
  2019-07-26  4:01 ` Kevin Carhart
  0 siblings, 1 reply; 6+ messages in thread
From: Karl Dahlke @ 2019-07-23 20:53 UTC (permalink / raw)
  To: edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 2576 bytes --]

Lord it's been a wild 5 weeks.

I got a spam email with an unsubscribe link, so I clicked on it,
and it was very js intensive, 20 thousand lines of js I would learn later, and it didn't work.
Well ok that became a project.

I made a local copy of the website, deminimized, with my trace points injected.
There was at least a week of work implementing these trace points and breakpoints in a way that would not disrupt the syntax or semantics of the code.
So now I have something to trace through, but I noticed the web page produced an error with my trace points in, that was not there without the trace.
As you know from any symbolic debugger, break points should not change the flow of execution!!
And yet it did.

It took another week or more for me to disentangle this mess from edbrowse and build a js only example of the phenomenon.
I sent it to Sami, saying it was his bug, but he couldn't reproduce it.
He tried several ways but couldn't reproduce it; meantime I had reproduced it on 3 different machines.
We finally determine the bug does not appear when duktape includes some debugging features.
Those features are stripped out by the various distributions.
That is typical; end users don't debug, so distribute the programs as lean as possible.
But it was a bit ironic; his users might run into this bug, but he never would,
and in fact he would have to debug the bug without the debugging features.
Well Sami is a world class programmer so in a few days he pushed the fix.
I pulled the latest duktape and rebuilt edbrowse and confirmed the fix.
Now I was back in the saddle again.
I could trace execution and insert breakpoints and that would not change the flow.

Many days of tracing and I finally realized I was missing some data, because an xhr request failed with 404.
That is because they were setting some special headers on xhr and I wasn't passing them to curl, in fact I was ignoring them altogether.
Once I made this connection the xhr call worked, and I got the json data I needed, but still the form didn't work.

More tracing and I realized there was a document.onchange handler that was never called.
Turns out every input in a form is suppose to trigger an oninput event and an onchange event,
and an onclick event if it is checkbox or radio.
I was doing the onclick but never even thought about oninput or onchange.
I made this connection (latest commit) and now the unsubscribe form works.
Hopefully I won't get any more email from them.

Wow! Debugging edbrowse is not for the faint of heart.

Karl Dahlke

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edbrowse-dev] If you Give a Mouse an Unsubscribe Link
  2019-07-23 20:53 [edbrowse-dev] If you Give a Mouse an Unsubscribe Link Karl Dahlke
@ 2019-07-26  4:01 ` Kevin Carhart
  2019-07-26 10:01   ` Chuck Hallenbeck
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Carhart @ 2019-07-26  4:01 UTC (permalink / raw)
  To: edbrowse-dev


If it's any consolation, I really enjoyed this narrative!  It's like 
Amazing Stories or the Analog SF magazine, only the stories are about 
debugging edbrowse.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edbrowse-dev] If you Give a Mouse an Unsubscribe Link
  2019-07-26  4:01 ` Kevin Carhart
@ 2019-07-26 10:01   ` Chuck Hallenbeck
  2019-07-31  4:33     ` Kevin Carhart
  2019-08-04 10:16     ` Adam Thompson
  0 siblings, 2 replies; 6+ messages in thread
From: Chuck Hallenbeck @ 2019-07-26 10:01 UTC (permalink / raw)
  To: Kevin Carhart; +Cc: edbrowse-dev

Hi Karl, Kevin, and all,

Just a note that debian is supplying edbrowse 3.7.4-3  as a regular
package in its Buster version, just recently promoted to the stable
version.

Chuck


-- 
Here In Northeast Ohio, The Moon is Waning Crescent (36% of Full)
           Two wrongs may not make a right, but three lefts do.
Sent from Janice's missing iPhone.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edbrowse-dev] If you Give a Mouse an Unsubscribe Link
  2019-07-26 10:01   ` Chuck Hallenbeck
@ 2019-07-31  4:33     ` Kevin Carhart
  2019-08-04 10:16     ` Adam Thompson
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin Carhart @ 2019-07-31  4:33 UTC (permalink / raw)
  To: edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

Hi Chuck!  That's good news.

Question for Karl  - could you forward me your latest email that you sent me about the third.js, here at fastmail?  I want to help with this but carhart.net is down and I need to review your message in order to know what to do.

I have a suggested push which I'm sending to you in the form of an attached startwindow.js.  It's just one line.  I'd like to add the .withCredentials property to xhr.  I found that if it's included, more xhr will succeed that fails otherwise.  Predominantly , or maybe solely, when jquery is involved, which is a lot.  jquery makes decisions about what the browser supports based on testing for the presence of things, and one of these is withCredentials.  If you have worked on startwindow since I grabbed a copy, I doubt it will conflict because my change is only in xhr.

Thank you for your forbearance, things are a little chaotic.  Once I can reread those instructions I would like to help put together a third.js soon, like maybe tomorrow evening.

Kevin

[-- Attachment #2: startwindow.js.zip --]
[-- Type: application/x-zip-compressed, Size: 36583 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edbrowse-dev] If you Give a Mouse an Unsubscribe Link
  2019-07-26 10:01   ` Chuck Hallenbeck
  2019-07-31  4:33     ` Kevin Carhart
@ 2019-08-04 10:16     ` Adam Thompson
  2019-08-04 10:22       ` Karl Dahlke
  1 sibling, 1 reply; 6+ messages in thread
From: Adam Thompson @ 2019-08-04 10:16 UTC (permalink / raw)
  To: edbrowse-dev

On Fri, Jul 26, 2019 at 06:01:12AM -0400, Chuck Hallenbeck wrote:
> Just a note that debian is supplying edbrowse 3.7.4-3  as a regular
> package in its Buster version, just recently promoted to the stable
> version.

Yeah I noticed this also, great news.

Also, I enjoyed the debugging narative.  One day I'll have to get my head
around all the great new debugging features in edbrowse.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [edbrowse-dev] If you Give a Mouse an Unsubscribe Link
  2019-08-04 10:16     ` Adam Thompson
@ 2019-08-04 10:22       ` Karl Dahlke
  0 siblings, 0 replies; 6+ messages in thread
From: Karl Dahlke @ 2019-08-04 10:22 UTC (permalink / raw)
  To: edbrowse-dev

> One day I'll have to get my head around all the great new debugging features in edbrowse.

I just rewrote the Debugging Javascript article in the wiki.
lots of good information there.
Thanks to Kevin for pushing me in this direction.

Karl Dahlke

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-04 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 20:53 [edbrowse-dev] If you Give a Mouse an Unsubscribe Link Karl Dahlke
2019-07-26  4:01 ` Kevin Carhart
2019-07-26 10:01   ` Chuck Hallenbeck
2019-07-31  4:33     ` Kevin Carhart
2019-08-04 10:16     ` Adam Thompson
2019-08-04 10:22       ` Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).