Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-13786

Web scenarios and slash in JSON response

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 3.4.8
    • None
    • None

      One of steps web scenario get token from server JSON response. Server send slash (symbol "/"). Zabbix added backslash for each slash.
      Debug from zabbix log:

       4878:20180411:043524.824 process_httptest() go to URL "https://stage-api.***.com/sso/validate/credentials"
       4878:20180411:043524.971 process_httptest() page.data from https://stage-api.***.com/sso/validate/credentials:'{"success":true,"data":{"member_id":710422,"first_name":"Alex","last_name":"San","level_id":12,"is_active":1,"is_suspended":0,"language_code":"ru","token":"$2y$10$5dWgm\/qYHl\/7ARVM5Nt4deXrONrjocs4q1f2RTIBC4WkvrOXXA7CK"}}'
       4878:20180411:043524.971 In int_in_list() list:'200' value:200
       4878:20180411:043524.971 End of int_in_list():SUCCEED
       4878:20180411:043524.971 In http_process_variables() 2 variables
       4878:20180411:043524.971 In httpmacro_append_pair() pkey:'{password}' pvalue:'xxxx'
       4878:20180411:043524.971 append macro '{password}'='xxxx' in cache
       4878:20180411:043524.971 End of httpmacro_append_pair():SUCCEED
       4878:20180411:043524.971 In httpmacro_append_pair() pkey:'{username}' pvalue:'710422'
       4878:20180411:043524.971 append macro '{username}'='710422' in cache
       4878:20180411:043524.971 End of httpmacro_append_pair():SUCCEED
       4878:20180411:043524.971 End of http_process_variables():SUCCEED
       4878:20180411:043524.971 In http_process_variables() 1 variables
       4878:20180411:043524.971 In httpmacro_append_pair() pkey:'{token}' pvalue:'regex:token":"(.*)"'
       4878:20180411:043524.971 append macro '{token}'='$2y$10$5dWgm\/qYHl\/7ARVM5Nt4deXrONrjocs4q1f2RTIBC4WkvrOXXA7CK' in cache
       4878:20180411:043524.971 End of httpmacro_append_pair():SUCCEED
       4878:20180411:043524.971 End of http_process_variables():SUCCEED
       4878:20180411:043524.971 In process_step_data() rspcode:200 time:0.146322 speed:1510.000000
       4878:20180411:043524.971 query [txnlev:0] [select type,itemid from httpstepitem where httpstepid=34]
       4878:20180411:043524.972 End of process_step_data()
       4878:20180411:043524.972 In substitute_simple_macros() data:'https://stage-login.***.com/?token={username}_{token}'
       4878:20180411:043524.972 In http_substitute_variables() data:'https://stage-login.***.com/?token={username}_{token}'
       4878:20180411:043524.972 End of http_substitute_variables() data:'https://stage-login.***.com/?token=710422_$2y$10$5dWgm\/qYHl\/7ARVM5Nt4deXrONrjocs4q1f2RTIBC4WkvrOXXA7CK'

      Can i remove this backslash any method?

      Thank you.

            Unassigned Unassigned
            anvodola Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: