overte-org / overte

Overte open source virtual worlds platform.
https://overte.org/
Other
130 stars 47 forks source link

Added simple protection for avatar URL #887

Closed ksuprynowicz closed 2 months ago

ksuprynowicz commented 3 months ago

This adds simple permissions system to script engines. As an example permission, setting to protect avatar URL is added here. This PR also prevents getting other people's avatar URLs. It's still work in progress - I need to add protection for avatar URL setting entry and bookmarks.

vegaslon commented 3 months ago

The actual bookmark names or thumbnails that you can define in them might be useful for casuals scripts to use for the purpose of nametags, or a wardrobe app etc.

ksuprynowicz commented 3 months ago

The actual bookmark names or thumbnails that you can define in them might be useful for casuals scripts to use for the purpose of nametags, or a wardrobe app etc.

Yes. The PR whitelists all local filesystem, tutorial and community apps scripts for this reason and provides simple UI for whitelisting more scripts and also for disabling this system entirely and allowing all scripts.

Future PRs will also contain UI that will allow scripts to ask for required permissions.

ksuprynowicz commented 3 months ago

This is now ready for code review and testing. Please let me know if it breaks anything.

vegaslon commented 3 months ago

avatar and some entity textures are broken on windows. overte-snap-by--on-2024-03-26_07-36-26

vegaslon commented 3 months ago

not caused by this pr but https://github.com/overte-org/overte/pull/854 which was merged between test builds

ksuprynowicz commented 2 months ago

@HifiExperiments Thank you for the review! Let me know if there's anything else to fix :) In the meantime I think this PR is ready for testing.

vegaslon commented 2 months ago

Script protection can not be turned off completely for untrusted sources using the checkbox . As a test try running this script https://raw.githubusercontent.com/danteruiz/hifi-content/dcad0fc0c16520815654c6a2f3cc12a11c1230e4/debug/avatarTest.js

ksuprynowicz commented 2 months ago

Fixed! Should work well now.

vegaslon commented 2 months ago

Yep works now, have not found any more bugs

ksuprynowicz commented 2 months ago

If there's no more problems I think this can be safely merged.