GovernIB / pluginsib

Repositori de Plugins per les Aplicacions del KitAnibal
0 stars 4 forks source link

SCANWEB: DynamicTwainWeb no funciona quan es connecta via HTTPS #27

Closed anadal-fundaciobit closed 6 years ago

anadal-fundaciobit commented 6 years ago

Bug reportat per Moises Palma de Limit el 31/10/2017 11:08:

hem trobat un bug al plugin d'escaneig de Dynamic Web Twain. Quan se crida als scripts de DWT per pujar el fitxers escanejats, la crida es fa sempre per via http:

DynamicWebTwainScanWebPlugin.java [520]

out.print( " DWObject.IfSSL = false; // Set whether SSL is used\n" ); out.print( " DWObject.HTTPPort = location.port == '' ? 80 : location.port;\n" );

Es problema es que quan s'empra el protocol 'https' la crida es fa sempre per 'http', provocant un error de navegador 'Mixed Content'. La solució que em aplicat es la següent:

out.print( " var isSSL = (window.location.protocol == 'https:');\n" ); out.print( " DWObject.IfSSL = isSSL; // Set whether SSL is used\n" ); out.print( " DWObject.HTTPPort = location.port != '' ? location.port : isSSL ? 443 : 80;\n" );

anadal-fundaciobit commented 6 years ago

Actualitzar a versió DWT 13.2

anadal-fundaciobit commented 6 years ago

Commit dins Registre: https://github.com/GovernIB/registre/commit/a0cf39fce6477cd5bbe2e68bc482df358e901cc1