rpwoodbu / mosh-chrome

Mosh for Chrome
GNU General Public License v3.0
372 stars 59 forks source link

Cannot Load External Stylesheets When Running on ChromeOS #113

Closed necopinus closed 8 years ago

necopinus commented 8 years ago

Trying to set an external stylesheet via the user-css preference doesn't work. For example, attempting to use the "Hack" font results in:

Refused to load the stylesheet 'https://cdn.jsdelivr.net/font-hack/2.018/css/hack-extended.min.css' because it violates the following Content Security Policy directive: "style-src 'self' blob: filesystem: data: chrome-extension-resource: 'unsafe-inline'".
hterm.ScrollPort.setUserCss @ hterm.js:3661

Interestingly, this issue is only present under Chrome OS for me -- using the same stylesheet but via Chrome on Mac OS X works fine.

Setting the style sheet works on Chrome Secure Shell under both Mac OS X and Chrome OS.

FWIW, I'm pretty sure this is the same issue as reported in #51. But the symptoms seem slightly different, which is why I'm opening it up as a separate ticket. The difference in behavior between the app under Chrome OS and the app run through Chrome on other operating systems seems a potentially useful data-point.

dpwiz commented 8 years ago

Is there a possible fix?

rpwoodbu commented 8 years ago

Sorry, folks, I've been stupid busy and haven't been able to give Mosh for Chrome much attention. My initial guess is that this isn't allowed for Packaged Apps (as per #51, which @necopinus pointed out). Secure Shell is not a Packaged App. Mosh for Chrome must be to get access to the APIs necessary to do UDP (or at least that was the case when I started the project; I haven't looked to see if anything has changed there).

If it works on Mac OS X but not on Chrome OS, that sounds like a Chrome bug and should be reported. So for now I'm going to call this a dup of #51.