qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

2.0.0-alpha5 Signing Breaking #150

Closed klabarge closed 8 years ago

klabarge commented 8 years ago

QZ Tray Version: 2.0.0-alpha5

I'm currently using a POST method which worked in the alpha4 version. EDIT: Using POST and GET have the same results

qz.security.setSignaturePromise(function(toSign) {
   return function(resolve, reject) {
      $.post("assets/signing/sign-message.php", {request: toSign}).then(resolve, reject);
   };
});

After installing the alpha5 version and adding in the new dependency: sha-256.min.js signing breaks on some, but not all of the functions reproducible in the sample.html

Even when signing breaks, the warning dialogue matches the name on my certificate. I'm not sure the value of this, but without setting signing up, the warning dialogue says "localhost..."

image

Here are my results. Note that I did not test all Seral / USB buttons

Signing Works

  1. Raw Printing Tab
    • List Network Info
    • Find Printer
    • Find Default Printer
    • Find All Printers
    • Base64
    • XML
    • Hex
    • zpl_sample.txt
    • fgl_sample.txt
    • epl_sample.txt
  2. Pixel Printing
    • Print PDF
    • Image
  3. Serial
    • List Ports
  4. USB
    • List Devices
    • List Device Interfaces
    • List Interface Endpoints

      Signing Breaks

  5. Raw Printing
    • EPL
    • ZPL
    • ESCP
    • EPCL (Zebra Card Printer)
  6. Pixel Printing
    • Print HTML

Things to try...

tresf commented 8 years ago

@bberenz please let us know if you need any further details on this.

akberenz commented 8 years ago

Looks like I had changed it to be a bit overzealous with unescaping. Fixed via 200eac73981ead85f8ff57deb2685fc4d6bbf9b6

tresf commented 8 years ago

@bberenz :+1:

@klabarge Can you please confirm? You'll have to build from 2.0 source.