[
https://issues.apache.org/jira/browse/SHINDIG-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Chabot resolved SHINDIG-1043.
-----------------------------------
Resolution: Fixed
Assignee: Chris Chabot
Nice catch, change looks good to me, committed & thanks for the report/patch!
> MODULE_ID is required for some gadgets but it did not processed if token is
> invalid
> -----------------------------------------------------------------------------------
>
> Key: SHINDIG-1043
> URL: https://issues.apache.org/jira/browse/SHINDIG-1043
> Project: Shindig
> Issue Type: Bug
> Components: PHP
> Affects Versions: trunk
> Reporter: Dmitry Vorobyev
> Assignee: Chris Chabot
>
> My test token is invalid and extractAndValidateToken throws exception. But
> Config::get('render_token_required') == false and this exception ignored. In
> this case MODULE_ID do not processed and cause js error.
> I do such patch:
> ===================================================================
> ---
> http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/GadgetFactory.php
> (revision 771267)
> +++
> http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/gadgets/GadgetFactory.php
> (working copy)
> @@ -119,6 +119,8 @@
> $gadget->substitutions = new Substitutions();
> if ($this->token) {
> $gadget->substitutions->addSubstitution('MODULE', "ID",
> $this->token->getModuleId());
> + } else {
> + $gadget->substitutions->addSubstitution('MODULE', "ID", 0);
> }
> if ($gadget->gadgetSpec->locales) {
> $gadget->substitutions->addSubstitutions('MSG',
> $gadget->gadgetSpec->locales);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.