File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,9 @@ export const fromHex = (hex: string): Uint8Array => {
332332 if ( "fromHex" in Uint8Array && typeof Uint8Array . fromHex === "function" ) {
333333 return Uint8Array . fromHex ( hex ) ;
334334 }
335+ if ( hex . length % 2 !== 0 ) {
336+ throw new Error ( "Invalid hex string" ) ;
337+ }
335338 return new Uint8Array (
336339 Array . from ( { length : hex . length / 2 } , ( _ , i ) =>
337340 parseInt ( hex . slice ( i * 2 , i * 2 + 2 ) , 16 ) ,
Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ export const replicaForwardPlugin = ({
9191 configureServer ( server : ViteDevServer ) {
9292 const replicaOrigin = `127.0.0.1:${ readReplicaPort ( ) } ` ;
9393 server . middlewares . use ( ( req , res , next ) => {
94- console . log ( `Incoming request` , req ) ;
9594 const authority = req . headers [ ":authority" ] as string ;
9695 if (
9796 /* Deny requests to raw URLs, e.g. <canisterId>.raw.ic0.app to make sure that II always uses certified assets
You can’t perform that action at this time.
0 commit comments