mirror of https://github.com/sgoudham/carbon.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
417 B
JavaScript
17 lines
417 B
JavaScript
5 years ago
|
/* global cy */
|
||
|
import { editorVisible } from '../support'
|
||
|
|
||
|
describe('security', () => {
|
||
|
it('should not alert from bg query parameter', () => {
|
||
|
const stub = cy.stub()
|
||
|
cy.on('window:alert', stub)
|
||
|
|
||
|
// https://github.com/carbon-app/carbon/issues/192
|
||
|
cy.visit(`?bg=rgba(171, 184, 195, 1)</style><img src="" onerror="alert('xss')" /><!--`)
|
||
|
|
||
|
editorVisible()
|
||
|
|
||
|
expect(stub).not.to.be.called
|
||
|
})
|
||
|
})
|