From 03e7b95a68414983b52f34ba498af72026635a25 Mon Sep 17 00:00:00 2001 From: Matt Czech Date: Thu, 17 Aug 2023 11:38:52 -0500 Subject: [PATCH] BIT-58: Fix TestFlight validation errors --- .../Support/Bitwarden.entitlements | 1 - Bitwarden/Application/Support/Info.plist | 2 + .../Application/Support/extension.js | 101 ++++++++++++++++++ .../Application/Support/Info.plist | 2 + 4 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 BitwardenActionExtension/Application/Support/extension.js diff --git a/Bitwarden/Application/Support/Bitwarden.entitlements b/Bitwarden/Application/Support/Bitwarden.entitlements index b5bb98407d..c0b80db014 100644 --- a/Bitwarden/Application/Support/Bitwarden.entitlements +++ b/Bitwarden/Application/Support/Bitwarden.entitlements @@ -18,7 +18,6 @@ com.apple.developer.nfc.readersession.formats - NDEF TAG com.apple.developer.associated-domains diff --git a/Bitwarden/Application/Support/Info.plist b/Bitwarden/Application/Support/Info.plist index 9332b895fd..1849c1aa86 100644 --- a/Bitwarden/Application/Support/Info.plist +++ b/Bitwarden/Application/Support/Info.plist @@ -18,6 +18,8 @@ 1 CFBundleIconName AppIcon + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleURLTypes diff --git a/BitwardenActionExtension/Application/Support/extension.js b/BitwardenActionExtension/Application/Support/extension.js new file mode 100644 index 0000000000..6bbad37f25 --- /dev/null +++ b/BitwardenActionExtension/Application/Support/extension.js @@ -0,0 +1,101 @@ +var BitwardenExtension = function () { }; + +BitwardenExtension.prototype = { + run: function (arguments) { + console.log('Run'); + console.log(arguments); + + var args = { + 'url_string': document.URL, + pageDetails: this.collect(document) + }; + + console.log(args); + arguments.completionFunction(args); + }, + finalize: function (arguments) { + console.log('Finalize'); + console.log(arguments); + + if (arguments.fillScript) { + this.fill(document, JSON.parse(arguments.fillScript)); + } + }, + + /* + 1Password Extension + + Lovingly handcrafted by Dave Teare, Michael Fey, Rad Azzouz, and Roustem Karimov. + Copyright (c) 2014 AgileBits. All rights reserved. + + ================================================================================ + + Copyright (c) 2014 AgileBits Inc. + + 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. + */ + + collect: function(document, undefined) { + var isFirefox = false, isChrome = false, isSafari = true; + document.elementsByOPID={};document.addEventListener('input',function(b){!1!==b.a&&'input'===b.target.tagName.toLowerCase()&&(b.target.dataset['com.agilebits.onepassword.userEdited']='yes')},!0); + function q(b,d){function f(a,e){var c=a[e];if('string'==typeof c)return c;c=a.getAttribute(e);return'string'==typeof c?c:null}function h(a,e){if(-1===['text','password'].indexOf(e.type.toLowerCase())||!(m.test(a.value)||m.test(a.htmlID)||m.test(a.htmlName)||m.test(a.placeholder)||m.test(a['label-tag'])||m.test(a['label-data'])||m.test(a['label-aria'])))return!1;if(!a.visible)return!0;if('password'==e.type.toLowerCase())return!1;var c=e.type;v(e,!0);return c!==e.type}function n(a){switch(p(a.type)){case 'checkbox':return a.checked? + '✓':'';case 'hidden':a=a.value;if(!a||'number'!=typeof a.length)return'';254\\?]/mg,''):null;return[c?c:null,a.value]}),{options:a}):null}function r(a){var e;for(a=a.parentElement||a.parentNode;a&&'td'!=p(a.tagName);)a=a.parentElement||a.parentNode;if(!a|| + void 0===a)return null;e=a.parentElement||a.parentNode;if('tr'!=e.tagName.toLowerCase())return null;e=e.previousElementSibling;if(!e||'tr'!=(e.tagName+'').toLowerCase()||e.cells&&a.cellIndex>=e.cells.length)return null;a=e.cells[a.cellIndex];a=a.textContent||a.innerText;return a=x(a)}function s(a){var e,c=[];if(a.labels&&a.labels.length&&0b.clientWidth||10>b.clientHeight)return!1;var s=b.getClientRects();if(0===s.length)return!1;for(var g=0;gh||0>r.right)return!1;if(0>l||l>h||0>d||d>n)return!1;for(f=b.ownerDocument.elementFromPoint(l+(f.right>window.innerWidth?(window.innerWidth-l)/2:f.width/2),d+(f.bottom>window.innerHeight? + (window.innerHeight-d)/2:f.height/2));f&&f!==b&&f!==document;){if(f.tagName&&'string'===typeof f.tagName&&'label'===f.tagName.toLowerCase()&&b.labels&&0Bitwarden Share CFBundleName Bitwarden Share Extension + CFBundleExecutable + $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleDevelopmentRegion