webauthn-open-source / fido2-lib

A node.js library for performing FIDO 2.0 / WebAuthn server functionality
https://webauthn.io
MIT License
394 stars 118 forks source link

Update main.cjs to fix the issue#123, Array.prototype methods cause validation error in the expected transports[<method>] to be 'string' #124

Closed thirug010 closed 1 year ago

thirug010 commented 1 year ago

Fix for Array.prototype methods cause validation error in the expected transports[] to be 'string' #123

use 'of' instead of 'in' ,because 'in' iterates over all enumerable property keys of an object * including the method cause invalid validation error, "of" only iterates through the values of objects.

thirug010 commented 1 year ago

Test failed with of I will update 'in' option with prototype methods to skipped.