You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Marshall Shi <sh...@cn.ibm.com> on 2012/05/09 13:56:00 UTC

Re: Review Request: Replace the unparseable cruft message "throw 1; < don't be evil' >" constant in client and server with a container config

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5011/
-----------------------------------------------------------

(Updated 2012-05-09 11:56:00.797407)


Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.


Changes
-------

Call for review of the patch. I've done the manual test, the unit test cases also been verified.


Summary
-------

The gadget io request will inject a unparseable cruft message "throw 1; < don't be evil' >" in the response content intentionally for security reasons.
However, this "throw 1; < don't be evil' >" string has been hardcoded in:
features/src/main/javascript/features/core.io/io.js
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java

It would be good to extract the message into a container config, so:
- client and server can reuse the same message.
- Shindig consumers can replace the message with their own. 


This addresses bug SHINDIG-1765.
    https://issues.apache.org/jira/browse/SHINDIG-1765


Diffs
-----

  http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js 1333012 
  http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js 1333012 
  http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java 1333012 
  http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java 1333012 
  http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestServletTest.java 1333012 
  http://svn.apache.org/repos/asf/shindig/trunk/config/container.js 1333012 

Diff: https://reviews.apache.org/r/5011/diff


Testing
-------

Tested by trying a few other messages in the container.js, the replaced message show up in the response correctly.


Thanks,

Marshall


Re: Review Request: Replace the unparseable cruft message "throw 1; < don't be evil' >" constant in client and server with a container config

Posted by Henry Saputra <hs...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5011/#review7785
-----------------------------------------------------------

Ship it!


+1

- Henry


On 2012-05-09 11:56:00, Marshall Shi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5011/
> -----------------------------------------------------------
> 
> (Updated 2012-05-09 11:56:00)
> 
> 
> Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.
> 
> 
> Summary
> -------
> 
> The gadget io request will inject a unparseable cruft message "throw 1; < don't be evil' >" in the response content intentionally for security reasons.
> However, this "throw 1; < don't be evil' >" string has been hardcoded in:
> features/src/main/javascript/features/core.io/io.js
> java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java
> 
> It would be good to extract the message into a container config, so:
> - client and server can reuse the same message.
> - Shindig consumers can replace the message with their own. 
> 
> 
> This addresses bug SHINDIG-1765.
>     https://issues.apache.org/jira/browse/SHINDIG-1765
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestServletTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/config/container.js 1333012 
> 
> Diff: https://reviews.apache.org/r/5011/diff
> 
> 
> Testing
> -------
> 
> Tested by trying a few other messages in the container.js, the replaced message show up in the response correctly.
> 
> 
> Thanks,
> 
> Marshall
> 
>


Re: Review Request: Replace the unparseable cruft message "throw 1; < don't be evil' >" constant in client and server with a container config

Posted by Stanton Sievers <si...@gmail.com>.

> On 2012-05-10 16:31:33, Henry Saputra wrote:
> > http://svn.apache.org/repos/asf/shindig/trunk/config/container.js, line 159
> > <https://reviews.apache.org/r/5011/diff/3/?file=107953#file107953line159>
> >
> >     Can we add default value for this config to default container.js file?

I'm not quite sure I follow, Henry. 


- Stanton


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5011/#review7774
-----------------------------------------------------------


On 2012-05-09 11:56:00, Marshall Shi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5011/
> -----------------------------------------------------------
> 
> (Updated 2012-05-09 11:56:00)
> 
> 
> Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.
> 
> 
> Summary
> -------
> 
> The gadget io request will inject a unparseable cruft message "throw 1; < don't be evil' >" in the response content intentionally for security reasons.
> However, this "throw 1; < don't be evil' >" string has been hardcoded in:
> features/src/main/javascript/features/core.io/io.js
> java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java
> 
> It would be good to extract the message into a container config, so:
> - client and server can reuse the same message.
> - Shindig consumers can replace the message with their own. 
> 
> 
> This addresses bug SHINDIG-1765.
>     https://issues.apache.org/jira/browse/SHINDIG-1765
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestServletTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/config/container.js 1333012 
> 
> Diff: https://reviews.apache.org/r/5011/diff
> 
> 
> Testing
> -------
> 
> Tested by trying a few other messages in the container.js, the replaced message show up in the response correctly.
> 
> 
> Thanks,
> 
> Marshall
> 
>


Re: Review Request: Replace the unparseable cruft message "throw 1; < don't be evil' >" constant in client and server with a container config

Posted by Henry Saputra <hs...@apache.org>.

> On 2012-05-10 16:31:33, Henry Saputra wrote:
> > http://svn.apache.org/repos/asf/shindig/trunk/config/container.js, line 159
> > <https://reviews.apache.org/r/5011/diff/3/?file=107953#file107953line159>
> >
> >     Can we add default value for this config to default container.js file?
> 
> Stanton Sievers wrote:
>     I'm not quite sure I follow, Henry.

This is what happen if you start reviewing patches without getting your coffee =(

I see you already adding new config entry in the config container.js file for the "unparseableCruft".

I thought I saw the "unparseableCruft" is defined in the container feature js file (they have the same name I believe).

sorry, another bad review from me =(


- Henry


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5011/#review7774
-----------------------------------------------------------


On 2012-05-09 11:56:00, Marshall Shi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5011/
> -----------------------------------------------------------
> 
> (Updated 2012-05-09 11:56:00)
> 
> 
> Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.
> 
> 
> Summary
> -------
> 
> The gadget io request will inject a unparseable cruft message "throw 1; < don't be evil' >" in the response content intentionally for security reasons.
> However, this "throw 1; < don't be evil' >" string has been hardcoded in:
> features/src/main/javascript/features/core.io/io.js
> java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java
> 
> It would be good to extract the message into a container config, so:
> - client and server can reuse the same message.
> - Shindig consumers can replace the message with their own. 
> 
> 
> This addresses bug SHINDIG-1765.
>     https://issues.apache.org/jira/browse/SHINDIG-1765
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestServletTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/config/container.js 1333012 
> 
> Diff: https://reviews.apache.org/r/5011/diff
> 
> 
> Testing
> -------
> 
> Tested by trying a few other messages in the container.js, the replaced message show up in the response correctly.
> 
> 
> Thanks,
> 
> Marshall
> 
>


Re: Review Request: Replace the unparseable cruft message "throw 1; < don't be evil' >" constant in client and server with a container config

Posted by Henry Saputra <hs...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5011/#review7774
-----------------------------------------------------------



http://svn.apache.org/repos/asf/shindig/trunk/config/container.js
<https://reviews.apache.org/r/5011/#comment17076>

    Can we add default value for this config to default container.js file?


- Henry


On 2012-05-09 11:56:00, Marshall Shi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5011/
> -----------------------------------------------------------
> 
> (Updated 2012-05-09 11:56:00)
> 
> 
> Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.
> 
> 
> Summary
> -------
> 
> The gadget io request will inject a unparseable cruft message "throw 1; < don't be evil' >" in the response content intentionally for security reasons.
> However, this "throw 1; < don't be evil' >" string has been hardcoded in:
> features/src/main/javascript/features/core.io/io.js
> java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java
> 
> It would be good to extract the message into a container config, so:
> - client and server can reuse the same message.
> - Shindig consumers can replace the message with their own. 
> 
> 
> This addresses bug SHINDIG-1765.
>     https://issues.apache.org/jira/browse/SHINDIG-1765
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestServletTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/config/container.js 1333012 
> 
> Diff: https://reviews.apache.org/r/5011/diff
> 
> 
> Testing
> -------
> 
> Tested by trying a few other messages in the container.js, the replaced message show up in the response correctly.
> 
> 
> Thanks,
> 
> Marshall
> 
>


Re: Review Request: Replace the unparseable cruft message "throw 1; < don't be evil' >" constant in client and server with a container config

Posted by Ryan Baxter <rb...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5011/#review7768
-----------------------------------------------------------

Ship it!


LGTM.

Last call for reviewers.  I plan on delivering this patch tomorrow morning if no one else has any comments.

- Ryan


On 2012-05-09 11:56:00, Marshall Shi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5011/
> -----------------------------------------------------------
> 
> (Updated 2012-05-09 11:56:00)
> 
> 
> Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.
> 
> 
> Summary
> -------
> 
> The gadget io request will inject a unparseable cruft message "throw 1; < don't be evil' >" in the response content intentionally for security reasons.
> However, this "throw 1; < don't be evil' >" string has been hardcoded in:
> features/src/main/javascript/features/core.io/io.js
> java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java
> 
> It would be good to extract the message into a container config, so:
> - client and server can reuse the same message.
> - Shindig consumers can replace the message with their own. 
> 
> 
> This addresses bug SHINDIG-1765.
>     https://issues.apache.org/jira/browse/SHINDIG-1765
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestServletTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/config/container.js 1333012 
> 
> Diff: https://reviews.apache.org/r/5011/diff
> 
> 
> Testing
> -------
> 
> Tested by trying a few other messages in the container.js, the replaced message show up in the response correctly.
> 
> 
> Thanks,
> 
> Marshall
> 
>


Re: Review Request: Replace the unparseable cruft message "throw 1; < don't be evil' >" constant in client and server with a container config

Posted by Stanton Sievers <si...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5011/#review7837
-----------------------------------------------------------

Ship it!


Committed revision 1338171.  Thanks!

Please close this review as submitted.

- Stanton


On 2012-05-09 11:56:00, Marshall Shi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5011/
> -----------------------------------------------------------
> 
> (Updated 2012-05-09 11:56:00)
> 
> 
> Review request for shindig, Ryan Baxter, Dan Dumont, and Stanton Sievers.
> 
> 
> Summary
> -------
> 
> The gadget io request will inject a unparseable cruft message "throw 1; < don't be evil' >" in the response content intentionally for security reasons.
> However, this "throw 1; < don't be evil' >" string has been hardcoded in:
> features/src/main/javascript/features/core.io/io.js
> java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java
> 
> It would be good to extract the message into a container config, so:
> - client and server can reuse the same message.
> - Shindig consumers can replace the message with their own. 
> 
> 
> This addresses bug SHINDIG-1765.
>     https://issues.apache.org/jira/browse/SHINDIG-1765
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/core.io/io.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestHandlerTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/servlet/MakeRequestServletTest.java 1333012 
>   http://svn.apache.org/repos/asf/shindig/trunk/config/container.js 1333012 
> 
> Diff: https://reviews.apache.org/r/5011/diff
> 
> 
> Testing
> -------
> 
> Tested by trying a few other messages in the container.js, the replaced message show up in the response correctly.
> 
> 
> Thanks,
> 
> Marshall
> 
>