Notifications

25 views

Description

sys_ref_list URL -- NPE caused if the sysparm_target value is a Service Catalog reference variable with an advanced ref. qualifier that includes javascript, and the list is accessed outside of the Catalog Item.

Steps to Reproduce

  1. Incognito browser window -- browser cache plays a role in this.
    2. Create a reference variable on any item.
    - Set the reference to incident (or anything).
    - Set 'Use reference qualifer' to 'Advanced.'
    - Set the Reference Qualifier to: javascript:'active=true' (or anything).

    3. Grab the sys_id of the variable.
    4. Go to /incident_list.do?sysparm_target=IO:<sys_id>&sysparm_view=sys_ref_list

    EXPECTED: List loads.
    ACTUAL: List does not load, NPE in logs.

    NPE:

    null:539:730: <g2:list_record_sys_ref_list> java.lang.NullPointerException: java.lang.NullPointerException: com.glide.processors.xmlhttp.LightweightReferenceUtil.addQuestionReference(LightweightReferenceUtil.java:329)
    com.glide.list_v2.ListRecordSysRefListTag.isLightweightReference(ListRecordSysRefListTag.java:150)
    com.glide.list_v2.ListRecordSysRefListTag.initAdditionalQuery(ListRecordSysRefListTag.java:93)
    com.glide.list_v2.ListRecordDefaultTag.doTag(ListRecordDefaultTag.java:78)
    org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
    org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
    org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)
    com.glide.ui.jelly.tags.FileinfoTag2.doTag(FileinfoTag2.java:44)
    org.apache.commons.jelly.impl.CustomTagScript.run(CustomTagScript.java:205)
    org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:235)

    In LightweightReferenceUtil.java:329, it looks like clientRecord remains null.

    --

    If you open up the Catalog Item: com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=...

    And click the Magnifying Glass, the list will open up without issue (uses the same URL). Afterwards, you won't be able to reproduce the issue. Something is cached in the browser that prevents it from happening again.

    --

    Issue comes into play when using ATF (Automated Test Framework).

Workaround

There is no workaround for this issue.


Related Problem: PRB1292851

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-11-12 08:33:36
Published:2018-11-12