diff --git a/gulpfile.js b/gulpfile.js index f8e0c90fa..f9ba97b74 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -73,7 +73,7 @@ const paths = { "emscripten/taler-emscripten-lib.js", "img/icon.png", "img/logo.png", - "src/**/*.{css,html}", + "src/**/*.{js,css,html}", ], // for the source distribution extra: [ diff --git a/manifest.json b/manifest.json index 271cceeb1..3df7aa687 100644 --- a/manifest.json +++ b/manifest.json @@ -50,7 +50,7 @@ ], "web_accessible_resources": [ - "src/*" + "src/webex/pages/redirect.html" ], "background": { diff --git a/src/i18n/de.po b/src/i18n/de.po index 37748180d..d96299de1 100644 --- a/src/i18n/de.po +++ b/src/i18n/de.po @@ -206,41 +206,41 @@ msgstr "" msgid "%1$s being spent\n" msgstr "" -#: src/webex/pages/popup.tsx:309 +#: src/webex/pages/popup.tsx:310 #, c-format msgid "Error: could not retrieve balance information." msgstr "" -#: src/webex/pages/popup.tsx:336 +#: src/webex/pages/popup.tsx:337 #, c-format msgid "Payback" msgstr "" -#: src/webex/pages/popup.tsx:337 +#: src/webex/pages/popup.tsx:338 #, c-format msgid "Return Electronic Cash to Bank Account" msgstr "" -#: src/webex/pages/popup.tsx:338 +#: src/webex/pages/popup.tsx:339 #, c-format msgid "Manage Trusted Auditors and Exchanges" msgstr "" -#: src/webex/pages/popup.tsx:350 +#: src/webex/pages/popup.tsx:351 #, fuzzy, c-format msgid "" "Bank requested reserve (%1$s) for\n" " %2$s.\n" msgstr "Bank bestätig anlegen der Reserve (%1$s) bei %2$s" -#: src/webex/pages/popup.tsx:360 +#: src/webex/pages/popup.tsx:361 #, fuzzy, c-format msgid "" "Started to withdraw\n" " %1$s%2$sfrom%3$s(%4$s).\n" msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt" -#: src/webex/pages/popup.tsx:369 +#: src/webex/pages/popup.tsx:370 #, fuzzy, c-format msgid "Merchant%1$soffered%2$scontract%3$s.\n" msgstr "" @@ -248,24 +248,24 @@ msgstr "" " möchte einen Vertrag über %2$s\n" " mit Ihnen abschließen." -#: src/webex/pages/popup.tsx:380 +#: src/webex/pages/popup.tsx:381 #, fuzzy, c-format msgid "Withdrew%1$sfrom%2$s(%3$s).\n" msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt" -#: src/webex/pages/popup.tsx:390 +#: src/webex/pages/popup.tsx:391 #, fuzzy, c-format msgid "" "Paid%1$sto merchant%2$s.\n" "%3$s(%4$s)\n" msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt" -#: src/webex/pages/popup.tsx:400 +#: src/webex/pages/popup.tsx:401 #, c-format msgid "Merchant%1$sgave a refund over%2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:410 +#: src/webex/pages/popup.tsx:411 #, fuzzy, c-format msgid "" "Merchant%1$sgave\n" @@ -276,17 +276,17 @@ msgstr "" " möchte einen Vertrag über %2$s\n" " mit Ihnen abschließen." -#: src/webex/pages/popup.tsx:420 +#: src/webex/pages/popup.tsx:421 #, c-format msgid "Unknown event (%1$s)" msgstr "" -#: src/webex/pages/popup.tsx:463 +#: src/webex/pages/popup.tsx:464 #, c-format msgid "Error: could not retrieve event history" msgstr "" -#: src/webex/pages/popup.tsx:488 +#: src/webex/pages/popup.tsx:489 #, c-format msgid "Your wallet has no events recorded." msgstr "Ihre Geldbörse verzeichnet keine Vorkommnisse." diff --git a/src/i18n/en-US.po b/src/i18n/en-US.po index c56d57f44..665b2771a 100644 --- a/src/i18n/en-US.po +++ b/src/i18n/en-US.po @@ -206,63 +206,63 @@ msgstr "" msgid "%1$s being spent\n" msgstr "" -#: src/webex/pages/popup.tsx:309 +#: src/webex/pages/popup.tsx:310 #, c-format msgid "Error: could not retrieve balance information." msgstr "" -#: src/webex/pages/popup.tsx:336 +#: src/webex/pages/popup.tsx:337 #, c-format msgid "Payback" msgstr "" -#: src/webex/pages/popup.tsx:337 +#: src/webex/pages/popup.tsx:338 #, c-format msgid "Return Electronic Cash to Bank Account" msgstr "" -#: src/webex/pages/popup.tsx:338 +#: src/webex/pages/popup.tsx:339 #, c-format msgid "Manage Trusted Auditors and Exchanges" msgstr "" -#: src/webex/pages/popup.tsx:350 +#: src/webex/pages/popup.tsx:351 #, c-format msgid "" "Bank requested reserve (%1$s) for\n" " %2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:360 +#: src/webex/pages/popup.tsx:361 #, c-format msgid "" "Started to withdraw\n" " %1$s%2$sfrom%3$s(%4$s).\n" msgstr "" -#: src/webex/pages/popup.tsx:369 +#: src/webex/pages/popup.tsx:370 #, c-format msgid "Merchant%1$soffered%2$scontract%3$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:380 +#: src/webex/pages/popup.tsx:381 #, c-format msgid "Withdrew%1$sfrom%2$s(%3$s).\n" msgstr "" -#: src/webex/pages/popup.tsx:390 +#: src/webex/pages/popup.tsx:391 #, c-format msgid "" "Paid%1$sto merchant%2$s.\n" "%3$s(%4$s)\n" msgstr "" -#: src/webex/pages/popup.tsx:400 +#: src/webex/pages/popup.tsx:401 #, c-format msgid "Merchant%1$sgave a refund over%2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:410 +#: src/webex/pages/popup.tsx:411 #, c-format msgid "" "Merchant%1$sgave\n" @@ -270,17 +270,17 @@ msgid "" "%4$s%5$s" msgstr "" -#: src/webex/pages/popup.tsx:420 +#: src/webex/pages/popup.tsx:421 #, c-format msgid "Unknown event (%1$s)" msgstr "" -#: src/webex/pages/popup.tsx:463 +#: src/webex/pages/popup.tsx:464 #, c-format msgid "Error: could not retrieve event history" msgstr "" -#: src/webex/pages/popup.tsx:488 +#: src/webex/pages/popup.tsx:489 #, c-format msgid "Your wallet has no events recorded." msgstr "" diff --git a/src/i18n/fr.po b/src/i18n/fr.po index b5b7259ee..4a50742b8 100644 --- a/src/i18n/fr.po +++ b/src/i18n/fr.po @@ -206,63 +206,63 @@ msgstr "" msgid "%1$s being spent\n" msgstr "" -#: src/webex/pages/popup.tsx:309 +#: src/webex/pages/popup.tsx:310 #, c-format msgid "Error: could not retrieve balance information." msgstr "" -#: src/webex/pages/popup.tsx:336 +#: src/webex/pages/popup.tsx:337 #, c-format msgid "Payback" msgstr "" -#: src/webex/pages/popup.tsx:337 +#: src/webex/pages/popup.tsx:338 #, c-format msgid "Return Electronic Cash to Bank Account" msgstr "" -#: src/webex/pages/popup.tsx:338 +#: src/webex/pages/popup.tsx:339 #, c-format msgid "Manage Trusted Auditors and Exchanges" msgstr "" -#: src/webex/pages/popup.tsx:350 +#: src/webex/pages/popup.tsx:351 #, c-format msgid "" "Bank requested reserve (%1$s) for\n" " %2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:360 +#: src/webex/pages/popup.tsx:361 #, c-format msgid "" "Started to withdraw\n" " %1$s%2$sfrom%3$s(%4$s).\n" msgstr "" -#: src/webex/pages/popup.tsx:369 +#: src/webex/pages/popup.tsx:370 #, c-format msgid "Merchant%1$soffered%2$scontract%3$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:380 +#: src/webex/pages/popup.tsx:381 #, c-format msgid "Withdrew%1$sfrom%2$s(%3$s).\n" msgstr "" -#: src/webex/pages/popup.tsx:390 +#: src/webex/pages/popup.tsx:391 #, c-format msgid "" "Paid%1$sto merchant%2$s.\n" "%3$s(%4$s)\n" msgstr "" -#: src/webex/pages/popup.tsx:400 +#: src/webex/pages/popup.tsx:401 #, c-format msgid "Merchant%1$sgave a refund over%2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:410 +#: src/webex/pages/popup.tsx:411 #, c-format msgid "" "Merchant%1$sgave\n" @@ -270,17 +270,17 @@ msgid "" "%4$s%5$s" msgstr "" -#: src/webex/pages/popup.tsx:420 +#: src/webex/pages/popup.tsx:421 #, c-format msgid "Unknown event (%1$s)" msgstr "" -#: src/webex/pages/popup.tsx:463 +#: src/webex/pages/popup.tsx:464 #, c-format msgid "Error: could not retrieve event history" msgstr "" -#: src/webex/pages/popup.tsx:488 +#: src/webex/pages/popup.tsx:489 #, c-format msgid "Your wallet has no events recorded." msgstr "" diff --git a/src/i18n/it.po b/src/i18n/it.po index b5b7259ee..4a50742b8 100644 --- a/src/i18n/it.po +++ b/src/i18n/it.po @@ -206,63 +206,63 @@ msgstr "" msgid "%1$s being spent\n" msgstr "" -#: src/webex/pages/popup.tsx:309 +#: src/webex/pages/popup.tsx:310 #, c-format msgid "Error: could not retrieve balance information." msgstr "" -#: src/webex/pages/popup.tsx:336 +#: src/webex/pages/popup.tsx:337 #, c-format msgid "Payback" msgstr "" -#: src/webex/pages/popup.tsx:337 +#: src/webex/pages/popup.tsx:338 #, c-format msgid "Return Electronic Cash to Bank Account" msgstr "" -#: src/webex/pages/popup.tsx:338 +#: src/webex/pages/popup.tsx:339 #, c-format msgid "Manage Trusted Auditors and Exchanges" msgstr "" -#: src/webex/pages/popup.tsx:350 +#: src/webex/pages/popup.tsx:351 #, c-format msgid "" "Bank requested reserve (%1$s) for\n" " %2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:360 +#: src/webex/pages/popup.tsx:361 #, c-format msgid "" "Started to withdraw\n" " %1$s%2$sfrom%3$s(%4$s).\n" msgstr "" -#: src/webex/pages/popup.tsx:369 +#: src/webex/pages/popup.tsx:370 #, c-format msgid "Merchant%1$soffered%2$scontract%3$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:380 +#: src/webex/pages/popup.tsx:381 #, c-format msgid "Withdrew%1$sfrom%2$s(%3$s).\n" msgstr "" -#: src/webex/pages/popup.tsx:390 +#: src/webex/pages/popup.tsx:391 #, c-format msgid "" "Paid%1$sto merchant%2$s.\n" "%3$s(%4$s)\n" msgstr "" -#: src/webex/pages/popup.tsx:400 +#: src/webex/pages/popup.tsx:401 #, c-format msgid "Merchant%1$sgave a refund over%2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:410 +#: src/webex/pages/popup.tsx:411 #, c-format msgid "" "Merchant%1$sgave\n" @@ -270,17 +270,17 @@ msgid "" "%4$s%5$s" msgstr "" -#: src/webex/pages/popup.tsx:420 +#: src/webex/pages/popup.tsx:421 #, c-format msgid "Unknown event (%1$s)" msgstr "" -#: src/webex/pages/popup.tsx:463 +#: src/webex/pages/popup.tsx:464 #, c-format msgid "Error: could not retrieve event history" msgstr "" -#: src/webex/pages/popup.tsx:488 +#: src/webex/pages/popup.tsx:489 #, c-format msgid "Your wallet has no events recorded." msgstr "" diff --git a/src/i18n/taler-wallet-webex.pot b/src/i18n/taler-wallet-webex.pot index b5b7259ee..4a50742b8 100644 --- a/src/i18n/taler-wallet-webex.pot +++ b/src/i18n/taler-wallet-webex.pot @@ -206,63 +206,63 @@ msgstr "" msgid "%1$s being spent\n" msgstr "" -#: src/webex/pages/popup.tsx:309 +#: src/webex/pages/popup.tsx:310 #, c-format msgid "Error: could not retrieve balance information." msgstr "" -#: src/webex/pages/popup.tsx:336 +#: src/webex/pages/popup.tsx:337 #, c-format msgid "Payback" msgstr "" -#: src/webex/pages/popup.tsx:337 +#: src/webex/pages/popup.tsx:338 #, c-format msgid "Return Electronic Cash to Bank Account" msgstr "" -#: src/webex/pages/popup.tsx:338 +#: src/webex/pages/popup.tsx:339 #, c-format msgid "Manage Trusted Auditors and Exchanges" msgstr "" -#: src/webex/pages/popup.tsx:350 +#: src/webex/pages/popup.tsx:351 #, c-format msgid "" "Bank requested reserve (%1$s) for\n" " %2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:360 +#: src/webex/pages/popup.tsx:361 #, c-format msgid "" "Started to withdraw\n" " %1$s%2$sfrom%3$s(%4$s).\n" msgstr "" -#: src/webex/pages/popup.tsx:369 +#: src/webex/pages/popup.tsx:370 #, c-format msgid "Merchant%1$soffered%2$scontract%3$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:380 +#: src/webex/pages/popup.tsx:381 #, c-format msgid "Withdrew%1$sfrom%2$s(%3$s).\n" msgstr "" -#: src/webex/pages/popup.tsx:390 +#: src/webex/pages/popup.tsx:391 #, c-format msgid "" "Paid%1$sto merchant%2$s.\n" "%3$s(%4$s)\n" msgstr "" -#: src/webex/pages/popup.tsx:400 +#: src/webex/pages/popup.tsx:401 #, c-format msgid "Merchant%1$sgave a refund over%2$s.\n" msgstr "" -#: src/webex/pages/popup.tsx:410 +#: src/webex/pages/popup.tsx:411 #, c-format msgid "" "Merchant%1$sgave\n" @@ -270,17 +270,17 @@ msgid "" "%4$s%5$s" msgstr "" -#: src/webex/pages/popup.tsx:420 +#: src/webex/pages/popup.tsx:421 #, c-format msgid "Unknown event (%1$s)" msgstr "" -#: src/webex/pages/popup.tsx:463 +#: src/webex/pages/popup.tsx:464 #, c-format msgid "Error: could not retrieve event history" msgstr "" -#: src/webex/pages/popup.tsx:488 +#: src/webex/pages/popup.tsx:489 #, c-format msgid "Your wallet has no events recorded." msgstr "" diff --git a/src/webex/pages/redirect.html b/src/webex/pages/redirect.html new file mode 100644 index 000000000..9d07d3d2b --- /dev/null +++ b/src/webex/pages/redirect.html @@ -0,0 +1,14 @@ + + + +
+ + + + + + + Redirecting to extension page ... + + + diff --git a/src/webex/pages/redirect.js b/src/webex/pages/redirect.js new file mode 100644 index 000000000..5a758cce4 --- /dev/null +++ b/src/webex/pages/redirect.js @@ -0,0 +1,12 @@ +/** + * This is the entry point for redirects, and should be the only + * web-accessible resource declared in the manifest. This prevents + * malicious websites from embedding wallet pages in them. + * + * We still need this redirect page since a webRequest can only directly + * redirect to pages inside the extension that are a web-accessible resource. + */ + + +const myUrl = new URL(window.location.href); +window.location.replace(myUrl.searchParams.get("url")); diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts index a778cc986..f1116637d 100644 --- a/src/webex/wxBackend.ts +++ b/src/webex/wxBackend.ts @@ -449,6 +449,21 @@ async function talerPay(fields: any, url: string, tabId: number): Promise