So as I’ve gone on looking at how things are inside TM, I’ve been having more questions. Here they are:
a) I can see a lot of events in Events.js. I’m not sure though, when any of them will be triggered. For example: onFolderStructureLoaded seems to be a custom event. How is tha triggered? As in how will the browser “know” that the folder structure was loaded so the event handler can get called?
b) I tried setting some stuff in Settings.js to False, like TM.Gui.showLibraryStructureToAnonymous and TM.Gui.LoadLibraryData, but it still got displayed. Why?
c) While logging in, code is being passed to a function called loginUser. I can see this and break in this while interacting, but a static search in the code (grep) didn’t yield anything. Is the code decompressed at runtime or something? Or have I messed up somewhere?
d) If I set a breakpoint on error: function (msg) and step into that, it takes me into a huge non word wrapped function, which looks like Jquery (confirmed by grepping for function(a,b) and it all turned up in Jquery libraries). Is there any custom code inside this that I should even try studying for security flaws? Do keep in mind that I am not currently interested in Jquery vulns themselves 🙂
e) There is a callback to loginresponse where the returned GUID (after login) is checked against a 32 bit GUID with all zeros. This function appears at times..and vanishes at other times; which means my breakpoints keep failing. They seem to appear only after I click the Login link on the home page, but that behavior is not consistent either. Wonder why? Firefox. Latest version. Ubuntu 12.04. Firebug. Latest version.
That’s it for now 🙂