Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-22086

Extraneous space in code creates "%20" in messagesend result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 15.0.16.81
    • Fix Version/s: 15.0.17.11
    • Component/s: FreePBX Framework
    • Labels:
      None
    • Sprint:
      Sprint 42
    • ToDo:
    • Asterisk Version:
      16.11.1
    • Module Fix Version:

      Description

      I'm writing a module which includes the following line:

      $ext -> add($context,"sms","",new ext_messagesend("\${ActualTo}","\${MESSAGE(from)}"));

      The end result in the dialplan is this:

      exten => sms,n,MessageSend(${ActualTo}, ${MESSAGE(from)})

      Note the space between the comma and the dollar sign.

      When the code is executed, the data received by ${MESSAGE(from)} includes a "%20" at the beginning of it.  When the space is removed, however, the %20 is no longer present.

      To fix this, I modified line 508 of /admin/libraries/extensions.class.php, removing the space found in the middle portion of the ternary statement.  You have:

      "MessageSend(".$this->to.", ".$this->from.")"

      but it needs to be:

      "MessageSend(".$this->to.",".$this->from.")"

      Thank you!

       

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                kgupta Kapil Gupta
                Reporter:
                loungehead Dan McMurray
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.