Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix E_NOTICE when requesting invalid script #449

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

cweiske
Copy link
Contributor

@cweiske cweiske commented Feb 23, 2022

It is possible to trigger an exception by requesting an invalid script path.

The following URL path leads to XSS on the exception page,
showing two nice popups:

http://myapp/_ignition/scripts/--><svg onload=alert(1337)>

The exception is:

ErrorException
Undefined index: --><svg onload=alert(1337)>

Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
vendor/facade/ignition/src/Http/Controllers/ScriptController.php:14

This happens with facade/ignition 1.18.0 (the last with laravel 6 support)
and should be fixed there.
The error probably also occurs in all later versions.

2022-02-23_1

It is possible to trigger an exception by requesting an invalid script path.

The following URL path leads to XSS on the exception page,
showing two nice popups:

  http://myapp/_ignition/scripts/--><svg onload=alert(1337)>

The exception is:

  ErrorException
  Undefined index: --><svg onload=alert(1337)>

  Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
  vendor/facade/ignition/src/Http/Controllers/ScriptController.php:14

This happens with facade/ignition 1.18.0 (the last with laravel 6 support)
and should be fixed there.
The error probably also occurs in all later versions.
@freekmurze freekmurze merged commit 1d71996 into facade:main Feb 23, 2022
@freekmurze
Copy link
Collaborator

Thanks!

@cweiske
Copy link
Contributor Author

cweiske commented Feb 23, 2022

Thanks for merging it so quickly.

Could you please release a new v1 version with that bugfix?

@freekmurze
Copy link
Collaborator

freekmurze commented Feb 23, 2022

Send a PR to the v1 branch and I'll take it from there.

cweiske added a commit to mogic-le/ignition that referenced this pull request Feb 23, 2022
It is possible to trigger an exception by requesting an invalid script path.

The following URL path leads to XSS on the exception page,
showing two nice popups:

  http://myapp/_ignition/scripts/--><svg onload=alert(1337)>

The exception is:

  ErrorException
  Undefined index: --><svg onload=alert(1337)>

  Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
  vendor/facade/ignition/src/Http/Controllers/ScriptController.php:14

This happens with facade/ignition 1.18.0 (the last with laravel 6 support)
and should be fixed there.
The error probably also occurs in all later versions.
freekmurze added a commit that referenced this pull request Feb 23, 2022
* Fix E_NOTICE when requesting invalid script (#449)

It is possible to trigger an exception by requesting an invalid script path.

The following URL path leads to XSS on the exception page,
showing two nice popups:

  http://myapp/_ignition/scripts/--><svg onload=alert(1337)>

The exception is:

  ErrorException
  Undefined index: --><svg onload=alert(1337)>

  Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
  vendor/facade/ignition/src/Http/Controllers/ScriptController.php:14

This happens with facade/ignition 1.18.0 (the last with laravel 6 support)
and should be fixed there.
The error probably also occurs in all later versions.

* Fix styling

Co-authored-by: freekmurze <freekmurze@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants