Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Content-Security-Policy violation: img-src

User_NXQDUAug 15 2022 — edited Aug 15 2022

Hi,
The lines in bold from the following code of ojcustomelement.js violating the Content-Security-Policy: img-src 'self'; function _ojHighContrast() {
// using a data uri, I googled for shortest uri to get this one since
// I don't care about the actual image, but I do want a legit image
// otherwise I see an error in chrome and I don't want users to be
// confused by seeing any error.
var div = document.createElement('div');
div.style.border = '1px solid';
div.style.borderColor = 'red green';
div.style.position = 'absolute';
div.style.top = '-999px';
div.style.backgroundImage = 'url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=)';
var body = document.body;
body.appendChild(div); // @HTMLUpdateOK safe manipulation
var computedStyles = window.getComputedStyle(div); var bki = computedStyles.backgroundImage; if (computedStyles.borderTopColor === computedStyles.borderRightColor ||
(bki != null && (bki === 'none' || bki === 'url (invalid-url:)'))) {
body.classList.add('oj-hicontrast');
} body.removeChild(div);
} Bootstrap.whenDocumentReady().then(function () {
_ojHighContrast();
});

ojcustomelement.js:859 Refused to load the image 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=' because it violates the following Content Security Policy directive: "img-src 'self'".

Did anyone encountered this? any inputs on this is highly appreciated,

Comments

3993082

Did you manage to solve the issue?

3993082

Are these two issue related?

hi,

above one not exact in sync just fyr, or else raise a MOS ticket for better tracking and re-solution

     So something really is not in sync. Possible reason OPMN and EM communication syncronisation ?? Don’t know …. So thumb rule, as per this release, don’t rely on EM message on server issue and log …rather see if OPMN managed processes are up and running fine or not .

3993082

Hi,

Thanks a lot for your quick response. I will raise MOS ticket, since my issue looks to be pretty different.

Im not even using OPMN at all.

Thanks for your help

hi thanks kindly mark the thread as answered so that other potential users will check.

User_BUQDA

Is this issue resolved ? I am having same issue .

brahmayya kandra

Hi All,
Is it resolved. I have facing same issue for sbconsole.

brahmayya kandra

Hi All,
@User_SL3ZU

It's resolved after admin restart.

Thanks!

1 - 9

Post Details

Added on Aug 15 2022
0 comments
247 views