Skip to content

Commit

Permalink
[BUG] https check sign blob (#1074) (#1075)
Browse files Browse the repository at this point in the history
* uses full url to check for https on sign blob interaction

* Added translations

* remves file accidentally added by transalations hook

Co-authored-by: aristides <aristides.staffieri@stellar.org>
  • Loading branch information
piyalbasu and aristidesstaffieri authored Jan 2, 2024
1 parent a13083b commit 57309b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions extension/src/popup/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@
"The website <1>{{domain}}</1> does not use an SSL certificate": {
" For additional safety Freighter only works with websites that provide an SSL certificate": "The website <1>{{domain}}</1> does not use an SSL certificate. For additional safety Freighter only works with websites that provide an SSL certificate."
},
"The website <1>{{url}}</1> does not use an SSL certificate": {
" For additional safety Freighter only works with websites that provide an SSL certificate": "The website <1>{{url}}</1> does not use an SSL certificate. For additional safety Freighter only works with websites that provide an SSL certificate."
},
"them noted to confirm you got them right": "them noted to confirm you got them right",
"this alert by going to": "this alert by going to",
"This asset has a balance": "This asset has a balance",
Expand Down
3 changes: 3 additions & 0 deletions extension/src/popup/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@
"The website <1>{{domain}}</1> does not use an SSL certificate": {
" For additional safety Freighter only works with websites that provide an SSL certificate": "The website <1>{{domain}}</1> does not use an SSL certificate. For additional safety Freighter only works with websites that provide an SSL certificate."
},
"The website <1>{{url}}</1> does not use an SSL certificate": {
" For additional safety Freighter only works with websites that provide an SSL certificate": "The website <1>{{url}}</1> does not use an SSL certificate. For additional safety Freighter only works with websites that provide an SSL certificate."
},
"them noted to confirm you got them right": "them noted to confirm you got them right",
"this alert by going to": "this alert by going to",
"This asset has a balance": "This asset has a balance",
Expand Down
8 changes: 4 additions & 4 deletions extension/src/popup/views/SignBlob/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const SignBlob = () => {
);

const blob = parsedSearchParam(location.search) as BlobToSign;
const { accountToSign, domain, isDomainListedAllowed } = blob;
const { accountToSign, domain, isDomainListedAllowed, url } = blob;

const {
allAccounts,
Expand Down Expand Up @@ -72,7 +72,7 @@ export const SignBlob = () => {
);
}

if (!domain.startsWith("https") && !isExperimentalModeEnabled) {
if (!url.startsWith("https") && !isExperimentalModeEnabled) {
return (
<WarningMessage
handleCloseClick={() => window.close()}
Expand All @@ -81,8 +81,8 @@ export const SignBlob = () => {
header={t("WEBSITE CONNECTION IS NOT SECURE")}
>
<p>
<Trans domain={domain}>
The website <strong>{{ domain }}</strong> does not use an SSL
<Trans domain={url}>
The website <strong>{{ url }}</strong> does not use an SSL
certificate. For additional safety Freighter only works with
websites that provide an SSL certificate.
</Trans>
Expand Down

0 comments on commit 57309b3

Please sign in to comment.