From 48c16de8bf74df0fa94a30d29e2e7e3446d48433 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 15 Aug 2021 00:06:40 +0800 Subject: Improve security and simplify code - Make variable name more semantic - Reduce cyclomatic complexities for the formula calculate function - Support specified unzip size limit on open file options, avoid zip bombs vulnerability attack - Typo fix for documentation and error message --- crypt.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crypt.go') diff --git a/crypt.go b/crypt.go index a0096c9..24ac7ec 100644 --- a/crypt.go +++ b/crypt.go @@ -3,9 +3,11 @@ // the LICENSE file. // // Package excelize providing a set of functions that allow you to write to -// and read from XLSX files. Support reads and writes XLSX file generated by -// Microsoft Excelâ„¢ 2007 and later. Support save file without losing original -// charts of XLSX. This library needs Go version 1.15 or later. +// and read from XLSX / XLSM / XLTM files. Supports reading and writing +// spreadsheet documents generated by Microsoft Excelâ„¢ 2007 and later. Supports +// complex components by high compatibility, and provided streaming API for +// generating or reading data from a worksheet with huge amounts of data. This +// library needs Go version 1.15 or later. package excelize @@ -15,6 +17,7 @@ import ( "crypto/cipher" "crypto/hmac" "crypto/md5" + "crypto/rand" "crypto/sha1" "crypto/sha256" "crypto/sha512" @@ -22,7 +25,6 @@ import ( "encoding/binary" "encoding/xml" "hash" - "math/rand" "reflect" "strings" -- cgit v1.2.1