Skip to content

Commit

Permalink
normalizing file names for compare
Browse files Browse the repository at this point in the history
  • Loading branch information
nocodeleaks committed May 17, 2024
1 parent 2308767 commit d90a047
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
"mattn",
"messageid",
"msgevt",
"myvar",
"officedocument",
"openxmlformats",
"ovpn",
Expand Down
3 changes: 2 additions & 1 deletion src/models/qp_send_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ func SecureAndCustomizeAttach(attach *whatsapp.WhatsappAttachment, logentry *log

var requestExtension string
if len(attach.FileName) > 0 {
requestExtension = filepath.Ext(attach.FileName)
fileNameNormalized := strings.ToLower(attach.FileName) // important, because some bitches do capitalize filenames
requestExtension = filepath.Ext(fileNameNormalized)
logentry.Debugf("send request, detected extension from filename: %s", requestExtension)

} else if len(attach.Mimetype) > 0 {
Expand Down

0 comments on commit d90a047

Please sign in to comment.