From 4989396abc2d5cdbe2e9a794cc9db871e546b8bf Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 12 Mar 2020 14:43:30 -0700 Subject: [PATCH 1/5] Initial CODE_OF_CONDUCT.md commit --- CODE_OF_CONDUCT.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..c72a5749c5 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,9 @@ +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns From 6ee4a6a5b46107c9bea93c3773248215c240b261 Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 12 Mar 2020 14:43:32 -0700 Subject: [PATCH 2/5] Initial LICENSE commit --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..3d8b93bc79 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE From 1f9b2cd48c86c288c2861ca6ebf50c77912ddeea Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 12 Mar 2020 14:43:33 -0700 Subject: [PATCH 3/5] Initial README.md commit --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000..b81a84e564 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. + +When you submit a pull request, a CLA bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. From d875dab29b7b7c2e507509c5eb268b4075081bf3 Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 12 Mar 2020 14:43:34 -0700 Subject: [PATCH 4/5] Initial SECURITY.md commit --- SECURITY.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..7ab49eb829 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + From cafe267bf0de5a019de08304ee79fc027576fb4a Mon Sep 17 00:00:00 2001 From: Alekhya Reddy Date: Wed, 18 Mar 2020 13:57:01 -0700 Subject: [PATCH 5/5] Removed commented out code --- src/modules/launcher/Wox.Launcher/dllmain.cpp | 159 ------------------ 1 file changed, 159 deletions(-) diff --git a/src/modules/launcher/Wox.Launcher/dllmain.cpp b/src/modules/launcher/Wox.Launcher/dllmain.cpp index 68efd29d09..d3ee29e670 100644 --- a/src/modules/launcher/Wox.Launcher/dllmain.cpp +++ b/src/modules/launcher/Wox.Launcher/dllmain.cpp @@ -26,17 +26,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser // These are the properties shown in the Settings page. struct ModuleSettings { - // Add the PowerToy module properties with default values. - // Currently available types: - // - int - // - bool - // - string - - //bool bool_prop = true; - //int int_prop = 10; - //std::wstring string_prop = L"The quick brown fox jumps over the lazy dog"; - //std::wstring color_prop = L"#1212FF"; - } g_settings; // Implement the PowerToy Module Interface and all the required methods. @@ -94,53 +83,6 @@ public: // Create a Settings object. PowerToysSettings::Settings settings(hinstance, get_name()); settings.set_description(GET_RESOURCE_STRING(IDS_LAUNCHER_SETTINGS_DESC)); - - // Show an overview link in the Settings page - //settings.set_overview_link(L"https://"); - - // Show a video link in the Settings page. - //settings.set_video_link(L"https://"); - - // A bool property with a toggle editor. - /*settings.add_bool_toogle( - L"bool_toggle_1", // property name. - L"This is what a BoolToggle property looks like", // description or resource id of the localized string. - g_settings.bool_prop // property value. - );*/ - - // An integer property with a spinner editor. - /*settings.add_int_spinner( - L"int_spinner_1", // property name - L"This is what a IntSpinner property looks like", // description or resource id of the localized string. - g_settings.int_prop, // property value. - 0, // min value. - 100, // max value. - 10 // incremental step. - );*/ - - // A string property with a textbox editor. - /*settings.add_string( - L"string_text_1", // property name. - L"This is what a String property looks like", // description or resource id of the localized string. - g_settings.string_prop // property value. - );*/ - - // A string property with a color picker editor. - /*settings.add_color_picker( - L"color_picker_1", // property name. - L"This is what a ColorPicker property looks like", // description or resource id of the localized string. - g_settings.color_prop // property value. - );*/ - - // A custom action property. When using this settings type, the "PowertoyModuleIface::call_custom_action()" - // method should be overriden as well. - /*settings.add_custom_action( - L"custom_action_id", // action name. - L"This is what a CustomAction property looks like", // label above the field. - L"Call a custom action", // button text. - L"Press the button to call a custom action." // display values / extended info. - );*/ - return settings.serialize_to_buffer(buffer, buffer_size); } @@ -152,12 +94,6 @@ public: // Parse the action values, including name. PowerToysSettings::CustomActionObject action_object = PowerToysSettings::CustomActionObject::from_json_string(action); - - /* - if (action_object.get_name() == L"custom_action_id") { - // Execute your custom action - } - */ } catch (std::exception ex) { // Improper JSON. @@ -171,34 +107,6 @@ public: PowerToysSettings::PowerToyValues values = PowerToysSettings::PowerToyValues::from_json_string(config); - // Update a bool property. - /* - if (values.is_bool_value(L"bool_toggle_1")) { - g_settings.bool_prop = values.get_bool_value(L"bool_toggle_1"); - } - */ - - // Update an int property. - /* - if (values.is_int_value(L"int_spinner_1")) { - g_settings.int_prop = values.get_int_value(L"int_spinner_1"); - } - */ - - // Update a string property. - /* - if (values.is_string_value(L"string_text_1")) { - g_settings.string_prop = values.get_string_value(L"string_text_1"); - } - */ - - // Update a color property. - /* - if (values.is_string_value(L"color_picker_1")) { - g_settings.color_prop = values.get_string_value(L"color_picker_1"); - } - */ - // If you don't need to do any custom processing of the settings, proceed // to persists the values calling: values.save_to_settings_file(); @@ -269,79 +177,12 @@ void Wox_Launcher::init_settings() { PowerToysSettings::PowerToyValues settings = PowerToysSettings::PowerToyValues::load_from_settings_file(get_name()); - // Load a bool property. - /* - if (settings.is_bool_value(L"bool_toggle_1")) { - g_settings.bool_prop = settings.get_bool_value(L"bool_toggle_1"); - } - */ - - // Load an int property. - /* - if (settings.is_int_value(L"int_spinner_1")) { - g_settings.int_prop = settings.get_int_value(L"int_spinner_1"); - } - */ - - // Load a string property. - /* - if (settings.is_string_value(L"string_text_1")) { - g_settings.string_prop = settings.get_string_value(L"string_text_1"); - } - */ - - // Load a color property. - /* - if (settings.is_string_value(L"color_picker_1")) { - g_settings.color_prop = settings.get_string_value(L"color_picker_1"); - } - */ } catch (std::exception ex) { // Error while loading from the settings file. Let default values stay as they are. } } -// This method of saving the module settings is only required if you need to do any -// custom processing of the settings before saving them to disk. -/* -void Wox.Launcher::save_settings() { - try { - // Create a PowerToyValues object for this PowerToy - PowerToysSettings::PowerToyValues values(get_name()); - - // Save a bool property. - //values.add_property( - // L"bool_toggle_1", // property name - // g_settings.bool_prop // property value - //); - - // Save an int property. - //values.add_property( - // L"int_spinner_1", // property name - // g_settings.int_prop // property value - //); - - // Save a string property. - //values.add_property( - // L"string_text_1", // property name - // g_settings.string_prop // property value - ); - - // Save a color property. - //values.add_property( - // L"color_picker_1", // property name - // g_settings.color_prop // property value - //); - - // Save the PowerToyValues JSON to the power toy settings file. - values.save_to_settings_file(); - } - catch (std::exception ex) { - // Couldn't save the settings. - } -} -*/ extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create() { return new Wox_Launcher();