ericferon / glpi-archimap

GLPI plugin for drawing architecture maps (based on draw.io)
GNU General Public License v2.0
19 stars 10 forks source link

Blank screen when "Drawing pane" is clicked : DOM Exemption #58

Closed undigo closed 2 years ago

undigo commented 2 years ago

Hi blank page when opening drawing page.

GLPI 9.5.7 archimap 3.2.6 Ubuntu 20.04 LTS a2enmod headers is on add this on *.conf apache2/sites-enabled

Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE"
Header always set Access-Control-Allow-Credentials "true"
Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding, App-Token, Session-Token"

APP_TOKEN with value = CrwzaZni7aWu5XAjitjEHctdxIW6yrON3HNBPJoa and key = empty

on Chrome 100.0.4896.88 error link with the code : xhr2.setRequestHeader("App-Token", user.app_token); debug : Uncaught DOMException: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': 'CrwzaZni7aWu5XAjitjEHctdxIW6yrON3HNBPJoa TXI3oHkmyFU98T46pO8msrNpfoIhRBwTsnRqZIsz TXI3oHkmyFU98T46pO8msrNpfoIhRBwTsnRqZIsz' is not a valid HTTP header field value. at XMLHttpRequest.xhr.onreadystatechange (:286:10)

I don't know what is the TXI3oHkmyFU98T46pO8msrNpfoIhRBwTsnRqZIsz API token ? not user API or App token

I see this DOM exemption that can be due to a \n on field value

Thanks for support. Best,

ericferon commented 2 years ago

No idea. I cannot help you ... K.r,

ericferon commented 2 years ago

Or maybe can you generate a new token ...

5xvd commented 2 years ago

I have the same issue with the GLPI Version 9.5.6

undigo commented 2 years ago

I resolve the issue I see that I can expand the value field on APP TOKEN on diagram configuration and on value there are 3 values and two values TXI3oHkmyFU98T46pO8msrNpfoIhRBwTsnRqZIsz under the copy paste token but are shadow without expand the field !

image

I delete these values and just keep the first token and awesome the Drawing pane can open up now.