ZF-7599: Zend_Gdata_Spreadsheets::updateCell() fails when using secure AuthSub session
Description
Cannot update spreadsheet using Zend_Gdata_Spreadsheets::cellUpdate() when using a secure authSub session. Return value is always:
Expected response code 200, got 401 Unknown authorization header Error 401
Looking at debug request log, it appears that the update PUT request is not being properly signed. Within updateCell(), the cell is first fetched (GET), then the entry is altered, and finally the altered entry is PUT. Logs follow:
GET /feeds/cells/tm6RQITd46trZEX0uix8KyQ/odb/private/full/R5C1 HTTP/1.1 Host: spreadsheets.google.com Connection: close User-Agent: MyCompany-MyApp-1.0 Zend_Framework_Gdata/1.9.0 authorization: AuthSub token="snipped" data="GET http://spreads heets.google.com/feeds/cells/tm6RQITd46trZEX0uix8KyQ/odb/private/full/R5C1 12502 54906 719094645" sig="tymBBUBE5qeO5e/JUC0d++MXZZF8QlqxJgUkcZROVGHHpa2ao/WrPTOgLo M8pHbASubmeC86H8vI+4bPAKnP8lqTDunCH7HMbTZgEdWgs2VY65TZeGzaVbVjYerkQ7R2EVpIV4A5Av lq8mm5kWMok9DFaIUPWeROF2vS0Tq2oqA=" sigalg="rsa-sha1"
The above fetches R5C1 from the spreadsheet without any problem. Still in Zend_Gdata_Spreadsheets::updateCell():
PUT /feeds/cells/tm6RQITd46trZEX0uix8KyQ/odb/private/full/R5C1/j09hlc HTTP/1.1 Host: spreadsheets.google.com Connection: close User-Agent: MyCompany-MyApp-1.0 Zend_Framework_Gdata/1.9.0 authorization: AuthSub token="snipped" data="GET http://spreads heets.google.com/feeds/cells/tm6RQITd46trZEX0uix8KyQ/odb/private/full/R5C1 12502 54906 719094645" sig="tymBBUBE5qeO5e/JUC0d++MXZZF8QlqxJgUkcZROVGHHpa2ao/WrPTOgLo M8pHbASubmeC86H8vI+4bPAKnP8lqTDunCH7HMbTZgEdWgs2VY65TZeGzaVbVjYerkQ7R2EVpIV4A5Av lq8mm5kWMok9DFaIUPWeROF2vS0Tq2oqA=" sigalg="rsa-sha1" Accept-encoding: identity Content-Type: application/atom+xml Content-Length: 841 content snipped
The above fails. Notice that the signature is identical to the original GET. (The entire data section after the token is incorrect!)
Fails in 1.9.0 and I assume in 1.9.1 as well. I haven't tested in 1.9.1, but I did not see anything in the changelog that appears to address this issue.
Comments
Posted by Rob Allen (rob) on 2012-11-20T20:52:38.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.