Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

[BUG-227354] Cannot rez media objects that have C0 control characters in the url. #5665

Open
1 task
sl-service-account opened this issue Jul 19, 2019 · 5 comments

Comments

@sl-service-account
Copy link

sl-service-account commented Jul 19, 2019

Information

Cannot rez media objects that have C0 control characters in the url.

Repro:

Drop the following script into a legacy box prim and click:

default
{
    touch_end(integer i)
    {
        if (llDetectedKey(0) == llGetOwner())
        {
            string data = "https://www.google.com/" + llUnescapeURL("%14"); //�
            if (i = llSetLinkMedia(LINK_THIS,5,[PRIM_MEDIA_CURRENT_URL,data,PRIM_MEDIA_PERMS_INTERACT,0x0,PRIM_MEDIA_PERMS_CONTROL,0x0]))
            {
                llOwnerSay("Media failed to be set due to error " + (string)i);
                return;
            }
            llOwnerSay("Data set: '" + llList2String(llGetLinkMedia(LINK_THIS,5,[PRIM_MEDIA_CURRENT_URL]),0) + "'");
        }
    }
}

Upon a message that data was set, take into inventory and try to rerez.
Box doesn't rerez.

Other Information

Had to use llUnescape() since C0 control characters aren't even allowed in script code here, heh.

Links

Related

Original Jira Fields
Field Value
Issue BUG-227354
Summary Cannot rez media objects that have C0 control characters in the url.
Type Bug
Priority Unset
Status Accepted
Resolution Accepted
Reporter Lucia Nightfire (lucia.nightfire)
Created at 2019-07-19T01:58:25Z
Updated at 2019-07-24T13:31:56Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2019-07-20T13:07:01.538-0500',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'Cannot rez media objects that have C0 control characters in the url.\r\n\r\nRepro:\r\n\r\nDrop the following script into a legacy box prim and click:\r\n{code}\r\ndefault\r\n{\r\n    touch_end(integer i)\r\n    {\r\n        if (llDetectedKey(0) == llGetOwner())\r\n        {\r\n            string data = "https://www.google.com/";\r\n            if (i = llSetLinkMedia(LINK_THIS,5,[PRIM_MEDIA_CURRENT_URL,data,PRIM_MEDIA_PERMS_INTERACT,0x0,PRIM_MEDIA_PERMS_CONTROL,0x0]))\r\n            {\r\n                llOwnerSay("Media failed to be set due to error " + (string)i);\r\n                return;\r\n            }\r\n            llOwnerSay("Data set: \'" + llList2String(llGetLinkMedia(LINK_THIS,5,[PRIM_MEDIA_CURRENT_URL]),0) + "\'");\r\n        }\r\n    }\r\n}\r\n{code}\r\nUpon a message that data was set, take into inventory and try to rerez.\r\nBox doesn\'t rerez.',
  'What were you doing when it happened?': '?',
  'What were you expecting to happen instead?': '?',
}
@sl-service-account
Copy link
Author

Whirly Fizzle commented at 2019-07-20T18:07:02Z

Shift copy works though....

@sl-service-account
Copy link
Author

Kadah Coba commented at 2019-07-21T21:40:29Z, updated at 2019-07-21T22:47:08Z

Why would you need url with a pilcrow?

@sl-service-account
Copy link
Author

Lucia Nightfire commented at 2019-07-21T22:44:13Z

@Kadah

You don't. Its just a basic example.

Yes, this is related to https://jira.secondlife.com/browse/BUG-216032 but I don't recall anyone mentioning anything about not being able to rez their objects so I don't know if the issue existed at the time or between then and now.

 

@sl-service-account
Copy link
Author

Kadah Coba commented at 2019-07-21T22:51:41Z

@lucia, I was gonna say that this is may related to the change that caused BUG-216032, lol. The sanitization on set and rez may be different and not be catching the same characters.

@sl-service-account
Copy link
Author

Caleb Linden commented at 2019-07-23T23:05:34Z

I'll take it in and link to BUG-216032. Thanks for the report

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant