VirtualBox

Changeset 74728 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Oct 9, 2018 10:52:12 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/rest: doPathParameters - percent-encode values before substitution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/rest/RTCRestClientRequestBase.cpp

    r74425 r74728  
    9494
    9595    /* Replace with actual values: */
    96     RTCString strTmpVal;
    9796    for (size_t i = 0; i < a_cPathParams; i++)
    9897    {
     
    107106                        VERR_REST_PATH_PARAMETER_NOT_SET);
    108107
    109         rc = a_paPathParamStates[i].pObj->toString(&strTmpVal, a_paPathParams[i].fFlags);
     108        RTCString strPathParam;
     109        rc = a_paPathParamStates[i].pObj->toString(&strPathParam, a_paPathParams[i].fFlags);
     110        AssertRCReturn(rc, rc);
     111
     112        RTCString strTmpVal;
     113        rc = strTmpVal.printfNoThrow("%RMpa", strPathParam.c_str()); /* urlencode */
    110114        AssertRCReturn(rc, rc);
    111115
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette