From 8a37b92bc83db229a788008c5a6a68cf51216ed2 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Sat, 14 Aug 2021 14:52:24 +0000 Subject: Refactoring: Url helpers (#1789) These changes are mainly to ensure that 'shell.open*' invocations are only in a single file. * Moved 'openPath' into the 'url-helpers' file. * Extract 'openExternalUrl' into a common location in 'url-helpers' This is done so that we can then apply vetting rules to ensure that there is no security concern as described in https://benjamin-altpeter.de/shell-openexternal-dangers/ --- src/containers/settings/RecipesScreen.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/containers/settings') diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index 526e0a1a9..fa8245c6e 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js @@ -12,10 +12,11 @@ import UserStore from '../../stores/UserStore'; import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; import ErrorBoundary from '../../components/util/ErrorBoundary'; import { CUSTOM_WEBSITE_RECIPE_ID, FRANZ_DEV_DOCS } from '../../config'; -import { asarRecipesPath, openPath, userDataRecipesPath } from '../../environment'; +import { asarRecipesPath, userDataRecipesPath } from '../../environment'; import { communityRecipesStore } from '../../features/communityRecipes'; import RecipePreview from '../../models/RecipePreview'; import AppStore from '../../stores/AppStore'; +import { openPath } from '../../helpers/url-helpers'; export default @inject('stores', 'actions') @observer class RecipesScreen extends Component { static propTypes = { -- cgit v1.2.3-54-g00ecf