Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #33470 from ferjm/bug1225450.iac.check.sync
Browse files Browse the repository at this point in the history
Bug 1225450 - Check origin for Sync Inter-App-Communication (IAC). r=…
  • Loading branch information
ferjm committed Dec 2, 2015
2 parents 3f50020 + 83f8800 commit 35943e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/system/js/sync_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,10 @@
return new Promise((resolve, reject) => {
navigator.mozApps.getSelf().onsuccess = event => {
var app = event.target.result;
app.connect(SYNC_REQUEST_IAC_KEYWORD).then(ports => {
app.connect(SYNC_REQUEST_IAC_KEYWORD, {
// For now we only allow one synchronizer app.
pageURLs: 'app://sync.gaiamobile.org'
}).then(ports => {
if (!ports || !ports.length) {
return reject();
}
Expand Down
5 changes: 4 additions & 1 deletion tv_apps/smart-system/js/sync_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,10 @@
return new Promise((resolve, reject) => {
navigator.mozApps.getSelf().onsuccess = event => {
var app = event.target.result;
app.connect(SYNC_REQUEST_IAC_KEYWORD).then(ports => {
app.connect(SYNC_REQUEST_IAC_KEYWORD, {
// For now we only allow one synchronizer app.
pageURLs: 'app://sync.gaiamobile.org'
}).then(ports => {
if (!ports || !ports.length) {
return reject();
}
Expand Down

0 comments on commit 35943e5

Please sign in to comment.