tomchapin / koc-power-tools

KoC Power Tools (for Kingdoms of Camelot) - Official Project
0 stars 3 forks source link

Report response handling #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. View the alliance report list or attack report list too often. 

What is the expected output? What do you see instead?
-- The response for a report message (included below) has a permission denied.  
This may be some sort of report throttling that kabam introduced.

- When this happens response that isn't handled correctly by the script.  The 
response message has an empty responseText, so this causes an error in the 
function mySuccess().  This function should be upgraded to validate that "rslt" 
is not empty.

- Besides fixing the function, we might look at slowing the request rate such 
as metering the requests.  If you look at the data below, it looks like there 
is a 2 second delay function being returned by the response.

What version of the product are you using? On what operating system?
- SVN, FF, scriptish 0.1.7

Please provide any additional information below.

-- Inspect of the response (inspect(msg,3,1))

[Scriptish] mat/KOC Power Tools: 294 @ 08:15:22.315: Msg:   (undefined) 
responseXML: null = null
  (string) responseText =  

( function() { return 
eval(unescape("%76%61%72%20%6e%20%3d%20%6e%65%77%20%44%61%74%65%28%29%3b%20%3b%3
b%3b%20%64%6f%20%7b%20%20%7d%20%77%68%69%6c%65%28%28%6e%65%77%20%44%61%74%65%28%
29%29%20%2d%20%6e%20%3c%20%32%30%32%32%29%3b")); })()
  (string) responseType = 
  (string) response =  

( function() { return 
eval(unescape("%76%61%72%20%6e%20%3d%20%6e%65%77%20%44%61%74%65%28%29%3b%20%3b%3
b%3b%20%64%6f%20%7b%20%20%7d%20%77%68%69%6c%65%28%28%6e%65%77%20%44%61%74%65%28%
29%29%20%2d%20%6e%20%3c%20%32%30%32%32%29%3b")); })()
  (number) status = 200
  (number) readyState = 4
  (boolean) multipart = false
  (boolean) mozBackgroundRequest = false
  (boolean) withCredentials = false
  (object) onreadystatechange = [xpconnect wrapped nsIDOMEventListener]

(Error) channel: Permission denied for <https://www294.kingdomsofcamelot.com> 
to get property XMLHttpRequest.channel
  (string) statusText = OK
  (object) upload = [object XMLHttpRequestUpload]
    (undefined) onabort: null = null
    (undefined) onerror: null = null
    (undefined) onload: null = null
    (undefined) onloadstart: null = null
    (undefined) onprogress: null = null
    (undefined) onloadend: null = null

  (number) UNSENT = 0
  (number) OPENED = 1
  (number) HEADERS_RECEIVED = 2
  (number) LOADING = 3
  (number) DONE = 4
  (undefined) onuploadprogress: null = null
  (undefined) onabort: null = null
  (undefined) onerror: null = null
  (undefined) onload: null = null
  (undefined) onloadstart: null = null
  (undefined) onprogress: null = null
  (undefined) onloadend: null = null

-- Here is the hex convert of the stuff in the response:
"var n = new Date(); ;;; do {  } while((new Date()) - n < 2022);??"

The number 2022 is different in each response, but is usually around 2000.

Original issue reported on code.google.com by phillip....@gmail.com on 1 Apr 2012 at 2:25

GoogleCodeExporter commented 9 years ago
I just looked at koc-515 and kabam isn't handling this case either. :(

So, I'm not sure if the permission denied error is intentional or an accident 
on their side.

Original comment by phillip....@gmail.com on 1 Apr 2012 at 2:56

GoogleCodeExporter commented 9 years ago
It is what they return when you reach the report cap limit. Will do an error 
check to alert the user when the limit is reached

Original comment by jonte...@gmail.com on 30 Apr 2012 at 4:35

GoogleCodeExporter commented 9 years ago

Original comment by barbaros...@gmail.com on 22 Apr 2014 at 10:48