UI error while generating a MAAS key (token)

Bug #1611342 reported by Victor Tapia
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Blake Rouse
2.0
Fix Released
Critical
Unassigned

Bug Description

In the preferences page of MAAS 2.0, pressing 'Generate MAAS key' shows the error message "Unable to create a new token" and leaves the spinning "loading" wheel. Refreshing the page shows the new key in the list.

It looks like an exception ('unknown token c') triggers while parsing the keys from a malformed JSON in function "requestKeys" (maas-yui.js).

- JSON sample:

{consumer_key: zN2WyCmRYyCYk9r4Px, token_key: jR26eZFYrA7dHugv7f, token_secret: pbaPaERJXn3KAGfvkZdatQufvKvJ9xtJ}

- Code:

652 success: function(id, out) {
653 var keys;
654 try {
655 keys = JSON.parse(out.response);
656 }
657 catch(e) {
658 // Parsing error.
659 self.displayError('Unable to create a new token.');
660 }
661 // Generate a token from the keys.
662 var token = self.createTokenFromKeys(
663 keys.consumer_key, keys.token_key,
664 keys.token_secret);

Tags: sts

Related branches

Victor Tapia (vtapia)
description: updated
Changed in maas:
status: New → Confirmed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.