Monday, February 20, 2023

Tim Hortons phishing email with subject We have been trying to reach you, your reward is waiting!

For the record, this is a Tim Hortons phishing email attempt that is recently going around, with subject "We have been trying to reach you, your reward is waiting!"

What to do?  Report them, goto bottom of page. 


From : Win Tim Hortons <info@contq.com>
Subject : 
 We have been trying to reach you, your reward is waiting!

                       





Following the link







PHISHING LINKs;


1. 
http://212.3.116.142/rd/xxx...

How to tell this is a Phishing email ?

  1. Check email address in full, if it's not from originating company then it's phishing.
  2. Hover over all links in email, if it's not from the  company's website then forget it.
  3. The best way is to 

How to examine Email Message Source ?

Now lets look at message source
  1. Outlook.com->Actions->View Message Source. 
  2. Gmail.com->More (down arrow to top right)->Show original.
Check for suspicious links, anything that does not originate from apple.com.


Report Phishing Email (not as Spam)

  1. Outlook.com->Junk (at Top)->Phishing Scam
  2. Gmail.com->More (down-arrow to top right)->Report Phishing 

Report Phishing

If you have received this email take it further at 

  1. https://www.google.com/safebrowsing/report_phish/


Report phishing at Microsoft and subsequently government agencies

  1. http://www.microsoft.com/security/online-privacy/phishing-faq.aspx
  2. Report Phishing Sites | CISA
  3. Home - Canada's Anti-Spam Legislation (fightspam.gc.ca)

Sunday, February 19, 2023

Wordpress Fixing WooCommerce 7.3.0+ Uncaught TypeError Cookies is defined

How to fix WooCommerce 7.3.0+ Uncaught TypeError : Cookies is undefined 

Recently, upgraded WooCommerce to Version 7.3.0.  

Strangely, I was getting the following error 


The following WooCommerce scripts was included for cookies

1
plugins/woocommerce/assets/js/js-cookie/js.cookie.min.js

Turns out v2.1.4 was release Apr 3, 2017

1
2
3
4
5
6
7
8
/*!
 * JavaScript Cookie v2.1.4
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
;(function (factory) {

Solution 

Upgrading to v3.0.1 released Sep 1, 2021, cleared the error. Why is this not part of the WooCommerce plugin upgrade? 

CDN - https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.js

1
2
wp_deregister_script( 'jquery-cookie' );
wp_enqueue_script( 'jquery-cookie', 'https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.min.js', array( 'jquery' ), '3.0.1', true );

Saturday, February 18, 2023

WordPress on Submit / Submissions goes to blank screen

 









Recently, witnessed an odd behavior on a WordPress site I maintain.

  1. As logged in Administrator, and submit button would lead to blank screen, execute but not forward to next page.
  2. As logged in Administrator, deleting a user, when selecting delete all contents, this would lead to a blank screen, execute but not forward. Refreshing screen, says user does not exist. 
  3. As a user, of site any submission would lead to a blank screen. 
It was annoying and took me some time to find the issue, checked the error_log indicated the problem. 

1
[18-Feb-2023 07:14:33 UTC] PHP Warning:  Cannot modify header information - 
headers already sent by (output started at /home/bond007/public_html/wp-content/themes/James/
functions.php:1) in 


But after I restored a previous version of functions.php I could not find any differences, using WinMerge

I opened the file in VSCode, could not find anything on line 1 wrong. 








I opened the file in Notepad++, could not find anything on line 1 wrong. 









Then I opened the file in Fred an open-source hex editor. 





So then I remember, allong time ago, in far off land, I got BOMed. 

Issue: 

You should ensure that the included files do not start with a BOM.

You may also find that the BOM causes problems for an ordinary PHP page. When sending custom HTTP headers the code to set the header must be called before output begins. A BOM at the start of the file causes the page to begin output before the header command is interpreted, and may lead to error messages and other problems in the displayed page.

Src: https://www.w3.org/International/questions/qa-byte-order-mark

Solution:

Change Encoding type in Notepad++ to UTF-8. Then save.


Tips:

Pay attention to the bottom of your editor for the file type.