You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Dmitry Vorobyev (JIRA)" <ji...@apache.org> on 2009/05/04 13:02:30 UTC

[jira] Created: (SHINDIG-1043) MODULE_ID is required for some gadgets but it did not processed if token is invalid

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


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.


[jira] Commented: (SHINDIG-1043) MODULE_ID is required for some gadgets but it did not processed if token is invalid

Posted by "Dmitry Vorobyev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707837#action_12707837 ] 

Dmitry Vorobyev commented on SHINDIG-1043:
------------------------------------------

Прошу прощения, но этот адрес не является моим основным и проверяется от случая к случаю. Если нужно срочно со мной связаться, то пишите на гуглопочту, начало адреса такое же как и тут.

Если ты робот, то прошу прощения еще раз, я не успел пока настроить фильтры.


> 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.


[jira] Resolved: (SHINDIG-1043) MODULE_ID is required for some gadgets but it did not processed if token is invalid

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
     [ 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.