Script execution on ProxySG device has issues with ? character
search cancel

Script execution on ProxySG device has issues with ? character

book

Article ID: 399746

calendar_today

Updated On:

Products

Management Center - VA ProxySG Software - SGOS

Issue/Introduction

When executing a script in Management Center (image version 4.1.1.12) on ProxySG SGOS 7.3.14.6 with a URL with the '?' character results in an unexpected output, where the information returned does not contain required details.

Here is an example output with a content-filter lookup for the URL 'example.com/path?param' is executed:

proxysg#(config content-filter)test-url example.com/path?name=value
 <URL>

When removing the parameter, all works fine as shown below

proxysg#(config content-filter)test-url example.com/pathparam
Testing URL 'http://example.com/pathparam'
categories: 
  Policy: none
  Blue Coat: Technology/Internet
category groups: 
  Blue Coat: Business Related; Technology

This issue is causing problems with automated parsing of script output and bulk lookups of URLs with a malicious component which can only be distinguished in the parameters/query/variables (e.g. onedrive links, email marketing links).

Environment

ProxySG.

Command line interface.

Cause

Must escape extended characters.

Resolution

Make sure to escape the ? character. Using the above example, we add a \ before the ? to escape it and return the correct information.

proxysg#(config content-filter)test-url example.com/pathparam\?name=neil
Testing URL 'http://example.com/pathparam?name=neil'
categories:
  Policy: Uncategorized
  Blue Coat: Technology/Internet
category groups:
  Blue Coat: Business Related; Technology