mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUACAMOLE-839: Omit properties added by AngularJS core from auth request parameters.
This commit is contained in:
@@ -196,6 +196,13 @@ angular.module('auth').factory('authenticationService', ['$injector',
|
|||||||
// Attempt authentication after auth parameters are available ...
|
// Attempt authentication after auth parameters are available ...
|
||||||
return parameters.then(function requestParametersReady(requestParams) {
|
return parameters.then(function requestParametersReady(requestParams) {
|
||||||
|
|
||||||
|
// Strip any properties that are from AngularJS core, such as the
|
||||||
|
// '$$state' property added by $q. Properties added by AngularJS
|
||||||
|
// core will have a '$' prefix. The '$$state' property is
|
||||||
|
// particularly problematic, as it is self-referential and explodes
|
||||||
|
// the stack when fed to $.param().
|
||||||
|
requestParams = _.omitBy(requestParams, (value, key) => key.startsWith('$'));
|
||||||
|
|
||||||
return requestService({
|
return requestService({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: 'api/tokens',
|
url: 'api/tokens',
|
||||||
|
Reference in New Issue
Block a user