CodeSleeve / asset-pipeline

This Laravel 4 package provides a very simple and easy to use asset pipeline. It was heavily inspired by the Rails asset pipeline. We make use of the wonderful Assetic package to help with pre-compliation!
http://www.codesleeve.com
MIT License
489 stars 53 forks source link

Prevent/remove asset urls from being added to the session 'url.intended'. #61

Closed red-crown closed 10 years ago

red-crown commented 10 years ago

This shouldn't be a problem normally, but I noticed it with a javascript file that was appending scripts to <head> with relative script src paths. This request was added to 'url.intended' session value from the call to Redirect::guest(), so the next call to Redirect::intended() tries to redirect to that asset path.

kdocki commented 10 years ago

@red-crown I'm not sure why this is happening. Are you able to replicate this?

Redirect::intended() is set when you do Redirect::guest('login') in this filter

Route::filter('auth', function()
{
    if (Auth::guest()) return Redirect::guest('login');
});
kdocki commented 10 years ago

@red-crown Are you running your assets through the auth filter? ...

red-crown commented 10 years ago

I'm not. It only occurred after a failed login. However, I haven't been able to reproduce it recently.

kdocki commented 10 years ago

I've been unable to reproduce this too. Perhaps this has been fixed in 1.4 version? Are you using that? If you can get steps to reproduce then please re-open this and I'll investigate this further. Thanks man!