Bug: Intermittant rejection of API Key
luke_church
Registered Users Posts: 507 Major grins
Description, very rarely, the system will reject the API key. For example during testing of subcategories.create on XML-RPC 1.1.1, the XML below was recieved.
Running exactly the same executable again would work without difficulty.
During testing, several 'non-determinstic' failures, which weren't the "login too fast" failure, and which went away upon re-run have been noted. However this is the first one where I was running a packet analyser when it occured. I suspect that other failures may have been the same.
Currently SmugTools considers an API Key failure to be fatal, and tears down the api-proxy if it recieves one. Should it be considered to be a non-final, try again error, like a connection error?
I will post further instances to the thread, especially if they happen on XML-RPC 1.1.0
API Key: SmugTools
XML:
[php]
<?xml version="1.0"?>
<methodCall>
<methodName>smugmug.login.withPassword</methodName>
<params>
<param>
<value>
<string>smugtest@polymorphix.net</string>
</value>
</param>
<param>
<value>
<string>...</string>
</value>
</param>
<param>
<value>
<string>1.1.1</string>
</value>
</param>
<param>
<value>
<string>...</string>
</value>
</param>
</params>
</methodCall>
Header
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>SessionID</name>
<value>
<string>..</string>
</value>
</member>
<member>
<name>UserID</name>
<value>
<int>39179</int>
</value>
</member>
<member>
<name>PasswordHash</name>
<value>
<string>...</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Header
<?xml version="1.0"?>
<methodCall>
<methodName>smugmug.subcategories.create</methodName>
<params>
<param>
<value>
<string>...</string>
</value>
</param>
<param>
<value>
<string>SubTestCategory74396707</string>
</value>
</param>
<param>
<value>
<i4>0</i4>
</value>
</param>
</params>
</methodCall>
Header
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value>
<int>18</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid API key</string>
</value>
</member>
</struct>
</value>
</fault>
</methodResponse>
[/php]
Running exactly the same executable again would work without difficulty.
During testing, several 'non-determinstic' failures, which weren't the "login too fast" failure, and which went away upon re-run have been noted. However this is the first one where I was running a packet analyser when it occured. I suspect that other failures may have been the same.
Currently SmugTools considers an API Key failure to be fatal, and tears down the api-proxy if it recieves one. Should it be considered to be a non-final, try again error, like a connection error?
I will post further instances to the thread, especially if they happen on XML-RPC 1.1.0
API Key: SmugTools
XML:
[php]
<?xml version="1.0"?>
<methodCall>
<methodName>smugmug.login.withPassword</methodName>
<params>
<param>
<value>
<string>smugtest@polymorphix.net</string>
</value>
</param>
<param>
<value>
<string>...</string>
</value>
</param>
<param>
<value>
<string>1.1.1</string>
</value>
</param>
<param>
<value>
<string>...</string>
</value>
</param>
</params>
</methodCall>
Header
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>SessionID</name>
<value>
<string>..</string>
</value>
</member>
<member>
<name>UserID</name>
<value>
<int>39179</int>
</value>
</member>
<member>
<name>PasswordHash</name>
<value>
<string>...</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Header
<?xml version="1.0"?>
<methodCall>
<methodName>smugmug.subcategories.create</methodName>
<params>
<param>
<value>
<string>...</string>
</value>
</param>
<param>
<value>
<string>SubTestCategory74396707</string>
</value>
</param>
<param>
<value>
<i4>0</i4>
</value>
</param>
</params>
</methodCall>
Header
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value>
<int>18</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid API key</string>
</value>
</member>
</struct>
</value>
</fault>
</methodResponse>
[/php]
0
Comments
XML below:
[php]
<?xml version="1.0"?>
<methodCall>
<methodName>smugmug.albums.delete</methodName>
<params>
<param>
<value>
<string>...</string>
</value>
</param>
<param>
<value>
<i4>806327</i4>
</value>
</param>
</params>
</methodCall>
Header
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value>
<int>18</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid API key</string>
</value>
</member>
</struct>
</value>
</fault>
</methodResponse>
[/php]
SmugSoftware: www.smugtools.com