From ec5e856f81cc019a6083b83bd93a85fd24f2189f Mon Sep 17 00:00:00 2001 From: Daniel Stoian <63335068+daniel-stoian-lgp@users.noreply.github.com> Date: Tue, 17 Dec 2024 02:04:05 +0200 Subject: [PATCH] WRR-10797: Replaced unsafe URLs (#1761) * replaced unsafe URLs * replaced unsafe URLs * revert unwanted change * code review fixes --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- IconItem/IconItem.js | 2 +- MediaOverlay/MediaOverlay.js | 2 +- README.md | 2 +- VideoPlayer/VideoPlayer.js | 4 ++-- samples/qa-a11y/src/views/Input.js | 2 +- samples/qa-a11y/src/views/VideoPlayer.js | 4 ++-- samples/qa-videoplayer/src/views/MainPanel.js | 2 +- .../src/views/usecase/UseCaseVideoPlayer.js | 2 +- samples/sampler/.qa-storybook/manager.js | 2 +- samples/sampler/.qa-storybook/preview.js | 16 ++++++++-------- samples/sampler/.storybook/manager.js | 2 +- samples/sampler/.storybook/preview.js | 16 ++++++++-------- samples/sampler/README.md | 2 +- samples/sampler/stories/default/MediaOverlay.js | 6 +++--- samples/sampler/stories/default/VideoPlayer.js | 14 +++++++------- samples/sampler/stories/qa/VideoPlayer.js | 12 ++++++------ tests/screenshot/apps/components/Input.js | 2 +- tests/screenshot/apps/components/InputField.js | 12 ++++++------ tests/ui/apps/MediaOverlay/MediaOverlay-View.js | 2 +- .../ui/apps/VideoPlayer/VideoPlayerVariables.js | 4 ++-- tests/ui/specs/VideoPlayer/VideoPlayer-specs.js | 2 +- 22 files changed, 58 insertions(+), 58 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d2da7b45ff..90c54b6686 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,7 @@ ### Checklist -* [ ] I have read and understand the [contribution guide](http://enactjs.com/docs/developer-guide/contributing/) -* [ ] A [CHANGELOG entry](http://enactjs.com/docs/developer-guide/contributing/changelogs/) is included +* [ ] I have read and understand the [contribution guide](https://enactjs.com/docs/developer-guide/contributing/) +* [ ] A [CHANGELOG entry](https://enactjs.com/docs/developer-guide/contributing/changelogs/) is included * [ ] At least one test case is included for this feature or bug fix * [ ] Documentation was added or is not needed * [ ] This is an API breaking change diff --git a/IconItem/IconItem.js b/IconItem/IconItem.js index c407cb6f11..0d902c5f12 100644 --- a/IconItem/IconItem.js +++ b/IconItem/IconItem.js @@ -80,7 +80,7 @@ const IconItemBase = kind({ * The background color, gradient, or image of this item. * Accepts any format of color, gradient type value, and image url. * - * Example: '#ff0000', 'radial-gradient(crimson, skyblue)', 'url(http://example.com/image.png) center / cover' + * Example: '#ff0000', 'radial-gradient(crimson, skyblue)', 'url(https://example.com/image.png) center / cover' * * @type {String} * @public diff --git a/MediaOverlay/MediaOverlay.js b/MediaOverlay/MediaOverlay.js index de6005d4bc..28fefd3f29 100644 --- a/MediaOverlay/MediaOverlay.js +++ b/MediaOverlay/MediaOverlay.js @@ -3,7 +3,7 @@ * * @example * - * + * * * * @module sandstone/MediaOverlay diff --git a/README.md b/README.md index 3f082329fe..e2268a5dbc 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,6 @@ Copyright (c) 2012-2024 LG Electronics Unless otherwise specified or set forth in the NOTICE file, all content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 +https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/VideoPlayer/VideoPlayer.js b/VideoPlayer/VideoPlayer.js index 3697e760c2..ef818d1ba5 100644 --- a/VideoPlayer/VideoPlayer.js +++ b/VideoPlayer/VideoPlayer.js @@ -2220,8 +2220,8 @@ const VideoPlayerBase = class extends Component { * * Example usage: * ``` - * - * + * + * * A video about my cat Boots, wearing boots. * * - + ); diff --git a/samples/qa-voice-control/src/views/usecase/UseCaseVideoPlayer.js b/samples/qa-voice-control/src/views/usecase/UseCaseVideoPlayer.js index 13d7e61090..f54e6cea73 100644 --- a/samples/qa-voice-control/src/views/usecase/UseCaseVideoPlayer.js +++ b/samples/qa-voice-control/src/views/usecase/UseCaseVideoPlayer.js @@ -1,6 +1,6 @@ import {VideoPlayer} from '@enact/sandstone/VideoPlayer'; -const src = 'http://media.w3.org/2010/05/sintel/trailer.mp4'; +const src = 'https://media.w3.org/2010/05/sintel/trailer.mp4'; const UseCaseVideoPlayer = () => { return ( diff --git a/samples/sampler/.qa-storybook/manager.js b/samples/sampler/.qa-storybook/manager.js index d88fa3acfb..3e0792a322 100644 --- a/samples/sampler/.qa-storybook/manager.js +++ b/samples/sampler/.qa-storybook/manager.js @@ -6,7 +6,7 @@ addons.setConfig({ theme: create({ base: 'dark', brandTitle: 'SANDSTONE QA SAMPLER', - brandUrl: 'http://enactjs.com/', + brandUrl: 'https://enactjs.com/', brandImage: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3MDAiIGhlaWdodD0iNzAwIiB2aWV3Qm94PSIwIDAgNzAwIDcwMCI+PGRlZnM+PHN0eWxlPi5hLC5ie2ZpbGw6I2ZmZjt9LmJ7b3BhY2l0eTowLjg7fTwvc3R5bGU+PC9kZWZzPjxwb2x5Z29uIGNsYXNzPSJhIiBwb2ludHM9IjM0OS45IDUyNy44IDE5OS45IDQyOS44IDE5OS45IDM3NC40IDM1MC4xIDQ3Mi43IDM0OS45IDM0OC41IDE5OS45IDI2MS4xIDE5OS45IDIwOS4zIDM1MCAyOTMuNiAzNTAgMjkzLjYgMzUwLjIgMjkzLjcgMzQ5LjkgMTY5LjMgMTAyLjcgNDguNSAxMDIuNyA0NzIuNiAzNTAuMSA2NTEuNiAzNDkuOSA1MjcuOCIvPjxwb2x5Z29uIGNsYXNzPSJiIiBwb2ludHM9IjM1MC4xIDY1MS42IDU5Ny4zIDQ3Mi44IDU5Ny4zIDM2Ni4zIDM0OS45IDUyNy44IDM1MC4xIDY1MS42Ii8+PHBvbHlnb24gY2xhc3M9ImIiIHBvaW50cz0iMzUwLjEgNDcyLjcgNTIzLjUgMzU5LjMgNTIzLjUgMjQ3LjQgMzQ5LjkgMzQ4LjUgMzUwLjEgNDcyLjciLz48cG9seWdvbiBjbGFzcz0iYiIgcG9pbnRzPSIzNTAgMjkzLjYgMzUwIDI5My42IDM1MC4yIDI5My43IDU5Ny4zIDE1NC44IDU5Ny4zIDQ4LjQgMzQ5LjkgMTY5LjMgMzUwIDI5My42Ii8+PC9zdmc+' }), bottomPanelHeight: ri.scale(400), diff --git a/samples/sampler/.qa-storybook/preview.js b/samples/sampler/.qa-storybook/preview.js index c16f3753bf..787644c9d5 100644 --- a/samples/sampler/.qa-storybook/preview.js +++ b/samples/sampler/.qa-storybook/preview.js @@ -29,14 +29,14 @@ const locales = { const backgrounds = { 'Default (Based on Skin)': 'default', - 'Strawberries (Red)': '#bb3352 url("http://picsum.photos/1280/720?image=1080") no-repeat center/cover', - 'Tunnel (Green)': '#4e6a40 url("http://picsum.photos/1280/720?image=1063") no-repeat center/cover', - 'Mountains (Blue)': '#5985a8 url("http://picsum.photos/1280/720?image=930") no-repeat center/cover', - 'Misty River': '#71736d url("http://picsum.photos/1280/720?image=1044") no-repeat center/cover', - 'Turbulant Tides': '#547460 url("http://picsum.photos/1280/720?image=1053") no-repeat center/cover', - 'Space Station': '#7c4590 url("http://picsum.photos/1280/720?image=967") no-repeat center/cover', - 'Warm Pup': '#5d6542 url("http://picsum.photos/1280/720?image=1025") no-repeat center/cover', - 'Random': '#555 url("http://picsum.photos/1280/720") no-repeat center/cover' + 'Strawberries (Red)': '#bb3352 url("https://picsum.photos/1280/720?image=1080") no-repeat center/cover', + 'Tunnel (Green)': '#4e6a40 url("https://picsum.photos/1280/720?image=1063") no-repeat center/cover', + 'Mountains (Blue)': '#5985a8 url("https://picsum.photos/1280/720?image=930") no-repeat center/cover', + 'Misty River': '#71736d url("https://picsum.photos/1280/720?image=1044") no-repeat center/cover', + 'Turbulant Tides': '#547460 url("https://picsum.photos/1280/720?image=1053") no-repeat center/cover', + 'Space Station': '#7c4590 url("https://picsum.photos/1280/720?image=967") no-repeat center/cover', + 'Warm Pup': '#5d6542 url("https://picsum.photos/1280/720?image=1025") no-repeat center/cover', + 'Random': '#555 url("https://picsum.photos/1280/720") no-repeat center/cover' }; const skins = { diff --git a/samples/sampler/.storybook/manager.js b/samples/sampler/.storybook/manager.js index cf3410b03d..ef1e86b69d 100644 --- a/samples/sampler/.storybook/manager.js +++ b/samples/sampler/.storybook/manager.js @@ -6,7 +6,7 @@ addons.setConfig({ theme: create({ base: 'dark', brandTitle: 'SANDSTONE SAMPLER', - brandUrl: 'http://enactjs.com/', + brandUrl: 'https://enactjs.com/', brandImage: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3MDAiIGhlaWdodD0iNzAwIiB2aWV3Qm94PSIwIDAgNzAwIDcwMCI+PGRlZnM+PHN0eWxlPi5hLC5ie2ZpbGw6I2ZmZjt9LmJ7b3BhY2l0eTowLjg7fTwvc3R5bGU+PC9kZWZzPjxwb2x5Z29uIGNsYXNzPSJhIiBwb2ludHM9IjM0OS45IDUyNy44IDE5OS45IDQyOS44IDE5OS45IDM3NC40IDM1MC4xIDQ3Mi43IDM0OS45IDM0OC41IDE5OS45IDI2MS4xIDE5OS45IDIwOS4zIDM1MCAyOTMuNiAzNTAgMjkzLjYgMzUwLjIgMjkzLjcgMzQ5LjkgMTY5LjMgMTAyLjcgNDguNSAxMDIuNyA0NzIuNiAzNTAuMSA2NTEuNiAzNDkuOSA1MjcuOCIvPjxwb2x5Z29uIGNsYXNzPSJiIiBwb2ludHM9IjM1MC4xIDY1MS42IDU5Ny4zIDQ3Mi44IDU5Ny4zIDM2Ni4zIDM0OS45IDUyNy44IDM1MC4xIDY1MS42Ii8+PHBvbHlnb24gY2xhc3M9ImIiIHBvaW50cz0iMzUwLjEgNDcyLjcgNTIzLjUgMzU5LjMgNTIzLjUgMjQ3LjQgMzQ5LjkgMzQ4LjUgMzUwLjEgNDcyLjciLz48cG9seWdvbiBjbGFzcz0iYiIgcG9pbnRzPSIzNTAgMjkzLjYgMzUwIDI5My42IDM1MC4yIDI5My43IDU5Ny4zIDE1NC44IDU5Ny4zIDQ4LjQgMzQ5LjkgMTY5LjMgMzUwIDI5My42Ii8+PC9zdmc+' }), bottomPanelHeight: ri.scale(400), diff --git a/samples/sampler/.storybook/preview.js b/samples/sampler/.storybook/preview.js index 6b5808156e..49fd9f11f3 100644 --- a/samples/sampler/.storybook/preview.js +++ b/samples/sampler/.storybook/preview.js @@ -30,14 +30,14 @@ const locales = { const backgrounds = { 'Default (Based on Skin)': 'default', - 'Strawberries (Red)': '#bb3352 url("http://picsum.photos/1280/720?image=1080") no-repeat center/cover', - 'Tunnel (Green)': '#4e6a40 url("http://picsum.photos/1280/720?image=1063") no-repeat center/cover', - 'Mountains (Blue)': '#5985a8 url("http://picsum.photos/1280/720?image=930") no-repeat center/cover', - 'Misty River': '#71736d url("http://picsum.photos/1280/720?image=1044") no-repeat center/cover', - 'Turbulant Tides': '#547460 url("http://picsum.photos/1280/720?image=1053") no-repeat center/cover', - 'Space Station': '#7c4590 url("http://picsum.photos/1280/720?image=967") no-repeat center/cover', - 'Warm Pup': '#5d6542 url("http://picsum.photos/1280/720?image=1025") no-repeat center/cover', - 'Random': '#555 url("http://picsum.photos/1280/720") no-repeat center/cover' + 'Strawberries (Red)': '#bb3352 url("https://picsum.photos/1280/720?image=1080") no-repeat center/cover', + 'Tunnel (Green)': '#4e6a40 url("https://picsum.photos/1280/720?image=1063") no-repeat center/cover', + 'Mountains (Blue)': '#5985a8 url("https://picsum.photos/1280/720?image=930") no-repeat center/cover', + 'Misty River': '#71736d url("https://picsum.photos/1280/720?image=1044") no-repeat center/cover', + 'Turbulant Tides': '#547460 url("https://picsum.photos/1280/720?image=1053") no-repeat center/cover', + 'Space Station': '#7c4590 url("https://picsum.photos/1280/720?image=967") no-repeat center/cover', + 'Warm Pup': '#5d6542 url("https://picsum.photos/1280/720?image=1025") no-repeat center/cover', + 'Random': '#555 url("https://picsum.photos/1280/720") no-repeat center/cover' }; const skins = { diff --git a/samples/sampler/README.md b/samples/sampler/README.md index 53d781f67b..e2ff33beaf 100644 --- a/samples/sampler/README.md +++ b/samples/sampler/README.md @@ -25,6 +25,6 @@ Copyright (c) 2016-2024 LG Electronics Unless otherwise specified or set forth in the NOTICE file, all content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 +https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/samples/sampler/stories/default/MediaOverlay.js b/samples/sampler/stories/default/MediaOverlay.js index 90c70148e4..057a97bfbb 100644 --- a/samples/sampler/stories/default/MediaOverlay.js +++ b/samples/sampler/stories/default/MediaOverlay.js @@ -9,9 +9,9 @@ const prop = { marqueeOn: ['focus', 'hover', 'render'], textAlign: ['start', 'center', 'end'], videos: { - Sintel: 'http://media.w3.org/2010/05/sintel/trailer.mp4', - 'Cosmos Laundromat': 'http://media.xiph.org/cosmoslaundromat/Pilot_Trailer_Cosmos_Laundromat.mp4', - VideoTest: 'http://media.w3.org/2010/05/video/movie_300.mp4', + Sintel: 'https://media.w3.org/2010/05/sintel/trailer.mp4', + 'Cosmos Laundromat': 'https://media.xiph.org/cosmoslaundromat/Pilot_Trailer_Cosmos_Laundromat.mp4', + VideoTest: 'https://media.w3.org/2010/05/video/movie_300.mp4', // Purposefully not a video to demonstrate source error state 'Bad Video Source': 'https://github.com/mderrick/react-html5video' }, diff --git a/samples/sampler/stories/default/VideoPlayer.js b/samples/sampler/stories/default/VideoPlayer.js index 48dd8addee..7d999f5462 100644 --- a/samples/sampler/stories/default/VideoPlayer.js +++ b/samples/sampler/stories/default/VideoPlayer.js @@ -40,17 +40,17 @@ const prop = { moreButtonColor: ['', 'red', 'green', 'yellow', 'blue'], videoTitles: ['Sintel', 'Cosmos Laundromat', 'VideoTest', 'Bad Video Source'], videos: { - Sintel: 'http://media.w3.org/2010/05/sintel/trailer.mp4', - 'Cosmos Laundromat': 'http://media.xiph.org/cosmoslaundromat/Pilot_Trailer_Cosmos_Laundromat.mp4', - VideoTest: 'http://media.w3.org/2010/05/video/movie_300.mp4', + Sintel: 'https://media.w3.org/2010/05/sintel/trailer.mp4', + 'Cosmos Laundromat': 'https://media.xiph.org/cosmoslaundromat/Pilot_Trailer_Cosmos_Laundromat.mp4', + VideoTest: 'https://media.w3.org/2010/05/video/movie_300.mp4', // Purposefully not a video to demonstrate source error state 'Bad Video Source': 'https://github.com/mderrick/react-html5video' }, posters: { - Sintel: 'http://media.w3.org/2010/05/sintel/poster.png', - 'Cosmos Laundromat': 'http://media.xiph.org/cosmoslaundromat/Cosmos_Laundromat_1-2k-png/07580.png', - VideoTest: 'http://media.w3.org/2010/05/video/poster.png', - 'Bad Video Source': 'http://media.w3.org/2010/05/video/poster.png' + Sintel: 'https://media.w3.org/2010/05/sintel/poster.png', + 'Cosmos Laundromat': 'https://media.xiph.org/cosmoslaundromat/Cosmos_Laundromat_1-2k-png/07580.png', + VideoTest: 'https://media.w3.org/2010/05/video/poster.png', + 'Bad Video Source': 'https://media.w3.org/2010/05/video/poster.png' }, events: [ 'onAbort', diff --git a/samples/sampler/stories/qa/VideoPlayer.js b/samples/sampler/stories/qa/VideoPlayer.js index b525f9a873..bcaddc0f96 100644 --- a/samples/sampler/stories/qa/VideoPlayer.js +++ b/samples/sampler/stories/qa/VideoPlayer.js @@ -24,9 +24,9 @@ class VideoSourceSwap extends Component { this.state = { videoTitles: ['Cosmos Laundromat', 'Sintel', 'VideoTest'], playlist: [ - 'http://media.xiph.org/cosmoslaundromat/Pilot_Trailer_Cosmos_Laundromat.mp4', - 'http://media.w3.org/2010/05/sintel/trailer.mp4', - 'http://media.w3.org/2010/05/video/movie_300.mp4' + 'https://media.xiph.org/cosmoslaundromat/Pilot_Trailer_Cosmos_Laundromat.mp4', + 'https://media.w3.org/2010/05/sintel/trailer.mp4', + 'https://media.w3.org/2010/05/video/movie_300.mp4' ], cursor: 0, preloadCursor: 1 @@ -155,7 +155,7 @@ class VideoPlayerWithfastForwardMode extends Component { title={'Cosmos Laundromat'} >