[UI] MAAS Configuration | Name allows for unescaped quote

Bug #1775099 reported by Kit Randel on 2018-06-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Kit Randel
2.4
Critical
Unassigned

Bug Description

Single quotes don't appear to be escaped when saved in Settings | General | MAAS Configuration | MAAS name.

This appears to generate an error on the /dashboard route.

```
Error: [$parse:lexerr] Lexer Error: Unterminated quote at columns 18-19 ['] in expression [site = 'kit's maas'].
http://errors.angularjs.org/1.5.10/$parse/lexerr?p0=Unterminated%20quote&p1=s%2018-19%20%5B'%5D&p2=site%20%3D%20'kit's%20maas'
    at http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):2:757
    at Lexer.throwError (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):6:29355)
    at Lexer.readString (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):6:31032)
    at Lexer.lex (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):6:27249)
    at AST.ast (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):6:31850)
    at ASTCompiler.compile (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):7:10366)
    at Parser.parse (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):8:851)
    at $parse (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):8:2641)
    at Scope.$eval (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):8:21764)
    at Object.pre (http://192.168.64.7:5240/MAAS/combo/angular.js?v=2.3.0fromsource(git+d70d470f89afc5d7c8355177b7a20172c43e3d87):10:17767) <body class="has-sticky-footer" data-ng-init="site = 'kit's maas'" data-maas-version-reloader="" window-width="">
```

Tags: ui Edit Tag help

Related branches

Changed in maas:
importance: Undecided → Critical
status: New → Triaged
milestone: none → 2.5.0
Kit Randel (blr) on 2018-06-05
summary: - MAAS Configuration | Name allows for unescaped quote [UI]
+ [UI] MAAS Configuration | Name allows for unescaped quote
Changed in maas:
status: Triaged → In Progress
assignee: nobody → Kit Randel (blr)
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.5.0 → 2.5.0alpha1
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers