This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Angular terminates when parsing cookies and decodeURIComponent throws error. #9211
Closed
Description
Tested with v1.3.0-rc.2
As far as I can tell, when angular goes to make a web request it parses the cookies that are set on the local machine. If any cookie causes decodeURIComponent to throw an error Angular will terminate. If this happens during the routing phase the view is left blank.
Origin: /src/ng/browser.js line 327
Lib: angular.js line 4832
Plunker: http://plnkr.co/edit/ZLg6SNrCteqGRrPhThWm?p=info
To reproduce, create a cookie "anyname=%abcd", use example app below.
test.html
angular.module('testapp', ['ngRoute']);
angular.module('testapp').config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'testtemplate.html',
})
.otherwise({ redirectTo: '/' });
}]);
testtemplate.html
<b>{{1 +1}}</b>