mysql – Sequelize.js – Invalid date problem in where clause

I have a sequelize model with column as follows:

      date: {
                    type: Sequelize.DATE,
                    field: 'utxn_date',
                    defaultValue: () => {
                        const now = new Date();
                        return `${formatISO(now, { representation: 'date' })} ${formatISO(now, {
                            representation: 'time',

At some moment, I need to filter this column, that I use the following code in my where (I tried to put a Date() component and also tried with a string as follows:

where = {
    (sequelize.Op.lte): {
        date: '2020-05-06 23:59', //endDateFilter,

But, at every time, I got this error:

"Invalid value { utxn_date: '2020-05-06 23:59' }"

If I do a SELECT directly on my database, the result of the column will be as follow:

utxn_id | utxn_user_id |      utxn_date      | utxn_value
 26     | 200          | 2019-10-26 10:15:52 | 100.00

Everything seems to be fine. In other moments I used similar filters in Sequelize.DATE columns and worked well. What I’m doing wrong?

command line – /bin/bash shell (macOS) throwing `-bash: declare: -A: invalid option` error message at shell start

I briefly changed my default shell on macOS Catalina (10.15.1) to Fish, following the steps in Fish’s documentation.

First, I executed > echo /usr/local/bin/fish | sudo tee -a /etc/shells followed by > chsh -s /usr/local/bin/fish. After, I realized I only needed to use one of these commands, not both, but oh well. What’s done is done.

Later, I decided to switch back to bash, so I ran the commands in reverse (according to Fish’s instructions for reverting) First, > echo /bin/bash | sudo tee -a /etc/shells followed by > chsh -s /bin/bash

When I reloaded the shell using Bash, I received the following error.

-bash: declare: -A: invalid option
declare: usage: declare (-afFirtx) (-p) (name(=value) ...)
-bash: complete: -D: invalid option
complete: usage: complete (-abcdefgjksuv) (-pr) (-o option) (-A action) (-G globpat) (-W wordlist) (-P prefix) (-S suffix) (-X filterpat) (-F function) (-C command) (name ...)

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit

This error did not appear before changing the shell to Fish and then back to Bash, and I didn’t edit any .bashrc or .bash_profile files before changing the shell back to Bash. Can someone help me resolve this?

firewall – How can I use iptables to drop packages for an invalid ether-type?

19:27:47.782291 98:9b:cb:: > ff:ff:ff:ff:ff:ff, ethertype Unknown (0x88e1), length 60:
        0x0000:  0000 a000 b052 38e5 d57f 0000 0000 0000  .....R8.........
        0x0010:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0020:  0000 0000 0000 0000 0000 0000 0000       ..............
19:27:47.782293 98:9b:cb:: > ff:ff:ff:ff:ff:ff, ethertype Unknown (0x8912), length 60:
        0x0000:  0170 a000 0000 1f84 e5a3 97a2 5553 bef1  .p..........US..
        0x0010:  fcf9 796b 5214 13e9 e200 0000 0000 0000  ..ykR...........
        0x0020:  0000 0000 0000 0000 0000 0000 0000       ..............

My router is sending this garbage into my network and I’d like to block it, as one cannot disable it. Doing so via iptables has proven to be more challenging than I thought it would be:

root@fw:~ # iptables -A INPUT -m mac --mac-source 98:9b:cb:: -p 0x88e1 -j DROP
iptables v1.8.2 (nf_tables): unknown protocol "0x88e1" specified
Try `iptables -h' or 'iptables --help' for more information.

Is there any way to block an invalid ether-type?

8 – Fix for “‘csrf_token’ URL query argument is invalid” error during logout

I am creating a set of API endpoints for a mobile app using Rest. For User authentication, I am using the default API endpoints supplied by Drupal. That would be

/user/logout?_format=json&token=<logout_token obtained from login api response.>

I wanted to remove the _format=json from the URL parameter and so I created a custom route with the existing controller just for this purpose. However, I am getting an error.

"'csrf_token' URL query argument is invalid

I am not able to figure out how to remove this error. I had added a csrf_token as an additional parameter with the one I got from successful login. It seems however that the csrf token being validated against is generated somewhere else.

I can remove this error by removing the csrf token entry from the routing file entry but that would be a security violation. How do we fix this error or is there a better way to handle the user logout api endpoint.

starfinder – Do you lose a turn/spell slot when casting a spell on invalid creatures?

Say my Mystic attempts to cast Fear as a 1st level spell on a creature.

1st: When you cast fear as a 1st-level spell, it affects one living creature of CR 4 or lower at close range…

If the DM reveals that the creature is above CR 4 and would be unaffected, does my turn then end with one of my 1st level spell slots being consumed?

As far as I could tell, I couldn’t find any specific rules about this in the spellcasting section of the CRB or elsewhere. I also haven’t played Pathfinder, but this question might apply for that system as well.

theme – Invalid template file in module ”

I just installed a new theme, and as soon as I go to the front-end I get this exception:

1 exception(s):
Exception #0 (MagentoFrameworkExceptionValidatorException): Invalid template file: 'Magento_Theme::newletter-popup.phtml' in module: '' block's name: 'home.script'

Exception #0 (MagentoFrameworkExceptionValidatorException): Invalid template file: 'Magento_Theme::newletter-popup.phtml' in module: '' block's name: 'home.script'
<pre>#1 MagentoFrameworkViewElementTemplate->_toHtml() called at (lib/internal/Magento/Framework/View/Element/AbstractBlock.php:1110)
#2 MagentoFrameworkViewElementAbstractBlock->MagentoFrameworkViewElement{closure}() called at (lib/internal/Magento/Framework/View/Element/AbstractBlock.php:1114)
#3 MagentoFrameworkViewElementAbstractBlock->_loadCache() called at (lib/internal/Magento/Framework/View/Element/AbstractBlock.php:674)
#4 MagentoFrameworkViewElementAbstractBlock->toHtml() called at (lib/internal/Magento/Framework/View/Layout.php:566)
#5 MagentoFrameworkViewLayout->_renderBlock('home.script') called at (lib/internal/Magento/Framework/View/Layout.php:542)
#6 MagentoFrameworkViewLayout->renderNonCachedElement('home.script') called at (generated/code/Magento/Framework/View/Layout/Interceptor.php:206)
#7 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('home.script') called at (lib/internal/Magento/Framework/View/Layout.php:497)
#8 MagentoFrameworkViewLayout->renderElement('home.script', false) called at (generated/code/Magento/Framework/View/Layout/Interceptor.php:193)
#9 MagentoFrameworkViewLayoutInterceptor->renderElement('home.script', false) called at (lib/internal/Magento/Framework/View/Layout.php:594)
#10 MagentoFrameworkViewLayout->_renderContainer('page.wrapper', false) called at (lib/internal/Magento/Framework/View/Layout.php:544)
#11 MagentoFrameworkViewLayout->renderNonCachedElement('page.wrapper') called at (generated/code/Magento/Framework/View/Layout/Interceptor.php:206)
#12 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('page.wrapper') called at (lib/internal/Magento/Framework/View/Layout.php:497)
#13 MagentoFrameworkViewLayout->renderElement('page.wrapper', false) called at (generated/code/Magento/Framework/View/Layout/Interceptor.php:193)
#14 MagentoFrameworkViewLayoutInterceptor->renderElement('page.wrapper', false) called at (lib/internal/Magento/Framework/View/Layout.php:594)
#15 MagentoFrameworkViewLayout->_renderContainer('root', false) called at (lib/internal/Magento/Framework/View/Layout.php:544)
#16 MagentoFrameworkViewLayout->renderNonCachedElement('root') called at (generated/code/Magento/Framework/View/Layout/Interceptor.php:206)
#17 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('root') called at (lib/internal/Magento/Framework/View/Layout.php:497)
#18 MagentoFrameworkViewLayout->renderElement('root', true) called at (generated/code/Magento/Framework/View/Layout/Interceptor.php:193)
#19 MagentoFrameworkViewLayoutInterceptor->renderElement('root') called at (lib/internal/Magento/Framework/View/Layout.php:963)
#20 MagentoFrameworkViewLayout->getOutput() called at (lib/internal/Magento/Framework/Interception/Interceptor.php:58)
#21 MagentoFrameworkViewLayoutInterceptor->___callParent('getOutput', array()) called at (lib/internal/Magento/Framework/Interception/Interceptor.php:138)
#22 MagentoFrameworkViewLayoutInterceptor->MagentoFrameworkInterception{closure}() called at (lib/internal/Magento/Framework/Interception/Interceptor.php:153)
#23 MagentoFrameworkViewLayoutInterceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at (generated/code/Magento/Framework/View/Layout/Interceptor.php:494)
#24 MagentoFrameworkViewLayoutInterceptor->getOutput() called at (lib/internal/Magento/Framework/View/Result/Page.php:257)
#25 MagentoFrameworkViewResultPage->render(&MagentoFrameworkAppResponseHttpInterceptor#0000000060b00286000000003b09d81b#) called at (lib/internal/Magento/Framework/View/Result/Layout.php:170)
#26 MagentoFrameworkViewResultLayout->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000060b00286000000003b09d81b#) called at (lib/internal/Magento/Framework/Interception/Interceptor.php:58)
#27 MGSMpanelBlockFrameworkPageInterceptor->___callParent('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000060b00286000000003b09d81b#)) called at (lib/internal/Magento/Framework/Interception/Interceptor.php:138)
#28 MGSMpanelBlockFrameworkPageInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppResponseHttpInterceptor#0000000060b00286000000003b09d81b#) called at (lib/internal/Magento/Framework/Interception/Interceptor.php:153)
#29 MGSMpanelBlockFrameworkPageInterceptor->___callPlugins('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000060b00286000000003b09d81b#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at (generated/code/MGS/Mpanel/Block/Framework/Page/Interceptor.php:156)
#30 MGSMpanelBlockFrameworkPageInterceptor->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000060b00286000000003b09d81b#) called at (lib/internal/Magento/Framework/App/Http.php:120)
#31 MagentoFrameworkAppHttp->launch() called at (generated/code/Magento/Framework/App/Http/Interceptor.php:24)
#32 MagentoFrameworkAppHttpInterceptor->launch() called at (lib/internal/Magento/Framework/App/Bootstrap.php:260)
#33 MagentoFrameworkAppBootstrap->run(&MagentoFrameworkAppHttpInterceptor#0000000060b0029d000000003b09d81b#) called at (index.php:39)

When I try to go to admin, instead it gives me this:

1 exception(s):
Exception #0 (MagentoFrameworkExceptionLocalizedException): Invalid Document 
Element 'add': Duplicate key-sequence ('Magento_Backend::mgs') in unique identity-constraint 'uniqueAddItemId'.
Line: 25

Exception #0 (MagentoFrameworkExceptionLocalizedException): Invalid Document 
Element 'add': Duplicate key-sequence ('Magento_Backend::mgs') in unique identity-constraint 'uniqueAddItemId'.
Line: 25

<pre>#1 MagentoFrameworkConfigReaderFilesystem->read('adminhtml') called at (app/code/Magento/Backend/Model/Menu/Config.php:144)
#2 MagentoBackendModelMenuConfig->_initMenu() called at (app/code/Magento/Backend/Model/Menu/Config.php:111)
#3 MagentoBackendModelMenuConfig->getMenu() called at (app/code/Magento/Backend/Model/Url.php:365)
#4 MagentoBackendModelUrl->_getMenu() called at (app/code/Magento/Backend/Model/Url.php:325)
#5 MagentoBackendModelUrl->getStartupPageUrl() called at (app/code/Magento/Backend/App/AbstractAction.php:186)
#6 MagentoBackendAppAbstractAction->_processUrlKeys() called at (generated/code/Magento/Backend/Controller/Adminhtml/Index/Index/Interceptor.php:50)
#7 MagentoBackendControllerAdminhtmlIndexIndexInterceptor->_processUrlKeys() called at (app/code/Magento/Backend/App/Request/BackendValidator.php:175)
#8 MagentoBackendAppRequestBackendValidator->validate(&MagentoFrameworkAppRequestHttp#000000002dd898420000000046a9b4a0#, &MagentoBackendControllerAdminhtmlIndexIndexInterceptor#000000002dd89b3c0000000046a9b4a0#) called at (lib/internal/Magento/Framework/App/Request/CompositeValidator.php:40)
#9 MagentoFrameworkAppRequestCompositeValidator->validate(&MagentoFrameworkAppRequestHttp#000000002dd898420000000046a9b4a0#, &MagentoBackendControllerAdminhtmlIndexIndexInterceptor#000000002dd89b3c0000000046a9b4a0#) called at (lib/internal/Magento/Framework/App/FrontController.php:160)
#10 MagentoFrameworkAppFrontController->processRequest(&MagentoFrameworkAppRequestHttp#000000002dd898420000000046a9b4a0#, &MagentoBackendControllerAdminhtmlIndexIndexInterceptor#000000002dd89b3c0000000046a9b4a0#) called at (lib/internal/Magento/Framework/App/FrontController.php:118)
#11 MagentoFrameworkAppFrontController->dispatch(&MagentoFrameworkAppRequestHttp#000000002dd898420000000046a9b4a0#) called at (lib/internal/Magento/Framework/Interception/Interceptor.php:58)
#12 MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', array(&MagentoFrameworkAppRequestHttp#000000002dd898420000000046a9b4a0#)) called at (lib/internal/Magento/Framework/Interception/Interceptor.php:138)
#13 MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppRequestHttp#000000002dd898420000000046a9b4a0#) called at (lib/internal/Magento/Framework/Interception/Interceptor.php:153)
#14 MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', array(&MagentoFrameworkAppRequestHttp#000000002dd898420000000046a9b4a0#), array(array('default_store_se...', 'page_cache_from_...', 'storeCookieValid...', 'install', 'configHash'))) called at (generated/code/Magento/Framework/App/FrontController/Interceptor.php:26)
#15 MagentoFrameworkAppFrontControllerInterceptor->dispatch(&MagentoFrameworkAppRequestHttp#000000002dd898420000000046a9b4a0#) called at (lib/internal/Magento/Framework/App/Http.php:116)
#16 MagentoFrameworkAppHttp->launch() called at (generated/code/Magento/Framework/App/Http/Interceptor.php:24)
#17 MagentoFrameworkAppHttpInterceptor->launch() called at (lib/internal/Magento/Framework/App/Bootstrap.php:260)
#18 MagentoFrameworkAppBootstrap->run(&MagentoFrameworkAppHttpInterceptor#000000002dd898540000000046a9b4a0#) called at (index.php:39)

Furthermore, when I run setup compile,

Fatal error:  Declaration of MGSMpanelControllerCategoryView::execute() must be compatible with MagentoCatalogControllerCategoryView::execute(): ?MagentoFrameworkControllerResultInterface in /var/www/html/Magento2/app/code/MGS/Mpanel/Controller/Category/View.php on line 129

Using SPF and DMARC records to combat invalid email subdomains

I have been able to confirm that bad actors are sending emails from nonexistent subdomains of my company’s primary domain.

Let’s say my primary domain is Email is sent from that base domain from my own mail system. Due to partnerships with a helpdesk provider, a e-commerce (storefront) company, and a CX/NPS provider, I also have three valid unique subdomains from which email comes from each (,, and

I have full DMARC w/ DKIM for all 4. With the invaluable assistance of DMARCian (a DMARC report aggregation & reporting service), I have confirmed that there are several sources of recurring email from other subdomains – ones that do not exist. For example, some unauthorized and unknown entity in VN is sending email from & Another source is sending from This last one is particularly of concern because the content of the few emails from this bad actor we’ve been forwarded is quite damaging to my company (we think it’s a foreign competitor in our fierce niche market behind it).

Unfortunately, my current DMARC polices are either monitor or quarantine; I can’t use a reject policy (that’s another battle.)

I am considering creating SFP & DMARC records for these nonexistent subdomains, with no allowed senders and a reject policy.

I’m not sure how effective this would be though. I also cannot think of any drawbacks, other than a bit of extra work to set it up and then maintain it when the bad actors start using different bogus subdomains. We’re always one step behind the bad guys, eh?

So… are there any drawbacks to what I am considering doing that I have not thought of? And do you think it’s worth the effort? Or is there a better approach to dealing with these bogus subdomains?

mysql – ERROR 1067 (42000): Invalid default value for ‘uploadedDate’

Hi everyone i am getting an error trying to run the below query ERROR 1067 (42000): Invalid default value for ‘uploadedDate’

CREATE TABLE `filenew` (
  `originalFilename` varchar(255) CHARACTER SET utf8 NOT NULL  /* MYSQL_TYPE_VARCHAR */,
  `shortUrl` varchar(255) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `fileType` varchar(150) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `extension` varchar(10) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `fileSize` bigint(15) DEFAULT NULL  /* MYSQL_TYPE_LONGLONG */,
  `localFilePath` varchar(255) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `userId` int(11) DEFAULT NULL  /* MYSQL_TYPE_LONG */,
  `uploadedUserId` int(11) DEFAULT NULL  /* MYSQL_TYPE_LONG */,
  `totalDownload` int(11) DEFAULT NULL  /* MYSQL_TYPE_LONG */,
  `uploadedIP` varchar(45) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `uploadedDate` timestamp DEFAULT NULL  /* MYSQL_TYPE_TIMESTAMP2 */,
  `statusId` int(2) DEFAULT NULL  /* MYSQL_TYPE_LONG */,
  `status` enum('active','trash','deleted') DEFAULT 'active'  /* MYSQL_TYPE_ENUM */,
  `visits` int(11) DEFAULT '0'  /* MYSQL_TYPE_LONG */,
  `lastAccessed` timestamp DEFAULT NULL  /* MYSQL_TYPE_TIMESTAMP2 */,
  `deleteHash` varchar(32) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `folderId` int(11) DEFAULT NULL  /* MYSQL_TYPE_LONG */,
  `serverId` int(11) DEFAULT '1'  /* MYSQL_TYPE_LONG */,
  `adminNotes` text CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_BLOB */,
  `accessPassword` varchar(32) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `fileHash` varchar(32) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `minUserLevel` int(3) DEFAULT NULL  /* MYSQL_TYPE_LONG */,
  `linkedFileId` int(11) DEFAULT NULL  /* MYSQL_TYPE_LONG */,
  `keywords` varchar(255) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `description` varchar(255) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `isPublic` int(1) NOT NULL DEFAULT '1'  /* MYSQL_TYPE_LONG */,
  `total_likes` int(11) NOT NULL DEFAULT '0'  /* MYSQL_TYPE_LONG */,
  `uploadSource` enum('direct','remote','ftp','torrent','leech','webdav','api','fileimport','other') CHARACTER SET utf8 NOT NULL DEFAULT 'direct'  /* MYSQL_TYPE_ENUM */,
  `unique_hash` varchar(64) CHARACTER SET utf8 DEFAULT NULL  /* MYSQL_TYPE_VARCHAR */,
  `date_updated` datetime DEFAULT NULL  /* MYSQL_TYPE_DATETIME2 */,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_hash` (`unique_hash`),
  KEY `shortUrl` (`shortUrl`),
  KEY `originalFilename` (`originalFilename`),
  KEY `fileSize` (`fileSize`),
  KEY `visits` (`visits`),
  KEY `lastAccessed` (`lastAccessed`),
  KEY `extension` (`extension`),
  KEY `userId` (`userId`),
  KEY `statusId` (`statusId`),
  KEY `userId_2` (`userId`),
  KEY `uploadedDate` (`uploadedDate`),
  KEY `folderId` (`folderId`),
  KEY `serverId` (`serverId`),
  KEY `fileHash` (`fileHash`),
  KEY `linkedFileId` (`linkedFileId`),
  KEY `statusId_2` (`statusId`),
  KEY `uploadedUserId` (`uploadedUserId`),
  KEY `keywords` (`keywords`),
  KEY `status` (`status`),
  KEY `uploadedIP` (`uploadedIP`)

I have tried many many fixes on Google and other forums but none of them worked, few things that i have tried are

Setting in my.cnf


Trying this


And many more, if someone could please help me out in this matter, i am not experienced in Databases i would really appreciate the help thanks alot.

**I am on centos 7 and MariaDB10.3.23-MariaD**

google analytics – AMP page error “invalid tag error” @charset

According to MDN, @charset:

cannot be used … inside the <style> element where the character set of the HTML page is relevant.

Since AMP pages are required to be UTF-8 encoded and they use meta tags to specify such, this falls under the case where the “character set of the HTML page is relevant”.

In short, AMP pages are not allowed to use @charset in a style tag.

Remove the @charset declaration from inside if your style tag, and the error will go away.

You can use the AMP Validator to help debug.

plugins – (configuration error) Invalid mailbox syntax is used in the Reply-To field

form code:

enter code here

Please fill out the entire form.

Owner Fast Name *
[text* text-1180]

Owner Last Name *
[text* text-1735 id:form28]

Owner E-mail

Business Name *
[text* text-1736 id:form29]

Business Address 1
[text text-1737 id:form30]

Business Address 2
[text text-1738 id:form31]

Business Address City
[text text-1739 id:form32]

Business Address State
[text text-1740 id:form33]

Business Address Zip Code
[text text-1741 id:form34]

[text text-1742 id:form35]

State of Company Registration
[text text-1743 id:form36]

State Registration Number
[text text-1744 id:form317]

Date of Formation
[date date-1745 id:form318]

Business Phone Number *
[text* text-1746 id:form319]

Owner Phone Number *
[text* text-1747 id:form410]

Nature of Business
[text text-1748 id:form411]


Type of business
[checkbox checkbox-1191 id:form57 “Retail” “Wholesale” “Manufacture” “Service”]

Organization/Business Type
[checkbox checkbox-1938 id:form58 “Sole Proprietorship” “General Partnership” “Limited Partnership” “Farm” “Other” “C Corporation” “S Corporation” “Limited Liability” “Partnership” “Limited” “Liability” “Company”]

[multistep “1-2-”]

[submit “Submit”]

Additional Headers

But why this is show : Invalid mailbox syntax is used in the Reply-To field.

How can I fix this ?