1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

B #~: Fix VMRC with users passwords with special chars (#2271)

This commit is contained in:
Frederick Borges 2022-09-05 10:21:15 +02:00 committed by GitHub
parent bf31d21a17
commit f3f28e3227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ define(function (require) {
*/
if (sunstone_fireedge_active && fireedge_token == "" && fireedge_endpoint) {
$.ajax({
url: "/fireedge",
url: "/auth_fireedge",
type: "GET",
success: function(data) {
set_fireedge_token(data.token);

View File

@ -564,7 +564,7 @@ helpers do
session[:mode] = $conf[:mode]
if RUBY_VERSION > '2.0.0'
auth = request.env['HTTP_AUTHORIZATION'].match(/(?<basic>\w+) (?<pass>\w+)/)
auth = request.env['HTTP_AUTHORIZATION'].match(/(?<basic>\w+) (?<pass>(\w|\W)+)/)
session[:auth] = auth[:pass]
else
auth = request.env['HTTP_AUTHORIZATION'].split(" ")
@ -1014,7 +1014,7 @@ end
##############################################################################
# GET FireEdge token
##############################################################################
get '/fireedge' do
get '/auth_fireedge' do
if !session[:fireedge_token].empty?
response = {:token => session[:fireedge_token]}
[200, response.to_json]