File tree Expand file tree Collapse file tree 4 files changed +20
-18
lines changed
Expand file tree Collapse file tree 4 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 11{
22 "manifest_version" : 2 ,
33 "name" : " Code Verify" ,
4- "version" : " 3.2.0 " ,
4+ "version" : " 3.2.1 " ,
55 "default_locale" : " en" ,
66 "description" : " An extension to verify the code running in your browser matches what was published." ,
77 "page_action" : {
Original file line number Diff line number Diff line change 11{
22 "manifest_version" : 3 ,
33 "name" : " Code Verify" ,
4- "version" : " 3.2.0 " ,
4+ "version" : " 3.2.1 " ,
55 "default_locale" : " en" ,
66 "description" : " An extension to verify the code running in your browser matches what was published." ,
77 "action" : {
Original file line number Diff line number Diff line change 11{
22 "name" : " meta-code-verify" ,
3- "version" : " 3.2.0 " ,
3+ "version" : " 3.2.1 " ,
44 "description" : " Browser extensions to verify code running in the browser against a published manifest" ,
55 "main" : " none" ,
66 "repository" : " git@github.com:facebookincubator/meta-code-verify.git" ,
Original file line number Diff line number Diff line change @@ -528,21 +528,23 @@ chrome.runtime.onMessage.addListener(request => {
528528 ) {
529529 return ;
530530 }
531- const hostname = window . location . hostname ;
532- const resourceURL = new URL ( request . response . url ) ;
533- if ( resourceURL . hostname === hostname ) {
534- // This can potentially be a worker, check if CSPs allow it as a worker
535- if (
536- allowedWorkerCSPs . every ( csp =>
537- doesWorkerUrlConformToCSP ( csp , resourceURL . toString ( ) ) ,
538- )
539- ) {
540- // This might be a worker, ensure it's CSP headers are valid
541- checkWorkerEndpointCSP (
542- request . response ,
543- allowedWorkerCSPs ,
544- currentOrigin . val ,
545- ) ;
531+ if ( isFbMsgrOrIgOrigin ( currentOrigin . val ) ) {
532+ const hostname = window . location . hostname ;
533+ const resourceURL = new URL ( request . response . url ) ;
534+ if ( resourceURL . hostname === hostname ) {
535+ // This can potentially be a worker, check if CSPs allow it as a worker
536+ if (
537+ allowedWorkerCSPs . every ( csp =>
538+ doesWorkerUrlConformToCSP ( csp , resourceURL . toString ( ) ) ,
539+ )
540+ ) {
541+ // This might be a worker, ensure it's CSP headers are valid
542+ checkWorkerEndpointCSP (
543+ request . response ,
544+ allowedWorkerCSPs ,
545+ currentOrigin . val ,
546+ ) ;
547+ }
546548 }
547549 }
548550 sendMessageToBackground ( {
You can’t perform that action at this time.
0 commit comments