# Off Topic > Suggestions for Improvement >  >  Why am I getting a Sucuri Firewall block with this code?

## delaing

I tried posting this section of code within an Excel VBA post and keep getting a block with the reason having something to do with detecting 

sucuri block select case code.png

Here is the block image:
sucuri block select case.png

What am I not understanding?  How would I be able to get help on this if it were the code in question?

Thank you,
Delain

----------


## alansidman

The Select statement confuses Sucuri.  It thinks that you are trying to write code to this site and you are not authorized.  Place a Space in the word Select and that will help or begin the statement with something other than the word Select.

----------


## delaing

I will try that.

Thanks for the quick response.

Delain

----------


## Doc.AElstein

Hi Delaing


There are a few things that Sucurri  does not like and  blocks like this, 
_ -  we know  about a few so far
http://www.excelforum.com/showthread...41#post4412541
http://www.excelforum.com/the-water-...ml#post4502342

They can be a pain to track down in a long code or text.

As that code of yours is quite short, it should be easy to track down and it would be useful to know about to “add to the list” !
 Can you upload that code  in a File please?

Thanks
Alan

----------


## Carson Dyle

I'm getting a similar error attempting enter this bit of simple code:

=AND($F19<>"",$F19<TOD())

If I add one more letter to the function name TODAY() in this line it trips the Securi bug with this error:

Block reason: Your request was not authorized due to its content (HTML code not allowed).

----------


## delaing

Doc Alan,

A quick response to your inquiry:
The suggestion by alansidman is what allowed me to finally post.  I had to add a space into "Select" to be "Se lect"; even had to do it with the End Select line.

Thank you,
Delain

----------


## Doc.AElstein

@ Delain,
Hi
Thanks
 :Smilie: 
Alan

_.......

  @ Carson Dyle
Hi
Thanks _....
_...Yep that is the  "< _with 4 character_" problem
http://www.excelforum.com/showthread...t=#post4295092
http://www.excelforum.com/the-water-...ml#post4283991
It come up a lot. It is probably the one that crops up the most
_.. - Use a space or the black character trick as discused in the other threads to get over that one
Alan

----------


## Carson Dyle

What's the danger of HTML code to your system? The vBulletin processing of the form submission before it's entered in the DBMS should handle any dangers of things like SQL injection.

----------


## FDibbins

> I'm getting a similar error attempting enter this bit of simple code:
> 
> =AND($F19<>"",$F19<TOD())
> 
> If I add one more letter to the function name TODAY() in this line it trips the Securi bug with this error:
> 
> Block reason: Your request was not authorized due to its content (HTML code not allowed).



add a space before and after the < and the >

----------


## Doc.AElstein

Hi Carson Dyle, 




> What's the danger of HTML code to your system? The vBulletin processing of the form submission before it's entered in the DBMS should handle any dangers of things like SQL injection.



I cannot help there, sorry, - my computing knowledge only extends to a couple of years part time Excel and excel VBA, learnt mostly from  Forums. I have no idea what a “DBMS” or  “SQL” injection  is
Sounds like a question for someone involved with he Forum Software or  Forum Management etc.. Unfortunately it appears they have forgotten about the Forum...
http://www.excelforum.com/the-water-...-outage-2.html
 :Frown:

----------


## Doc.AElstein

Duplicate post.....   Sucurri problems !!

----------


## Doc.AElstein

Get a Sucuri Freak Out Paddy with 4 Selects   :Wink: 






> .....The suggestion by alansidman is what allowed me to finally post.  I had to add a space into "Select" to be "Se lect"; even had to do it with the End Select line.....



  I had a look at this so as to know about it in Case I get it..  :Smilie: 

  This *Select* one is a difficult one to track down exactly !!

*These cause Sucurri to freak out* at least  the first time you try. Try again after and sometimes, but not always and  they do not !!!!


select

select 

select

end select

__.____________________

Select
select

select

SeLect

_.______

select

select 

select
end select

_.____________________

select
select 

select

end select

_.______________________________

Select 

select 

select sbamnsb
End SeLect[

_:____

select 

select 

select aKDHajdh

select[

_._______________

*These do not* cause the Sucurri freak out

Select 

selectdhj

selectsbamnsb
End SeLect[

_._____________________

Select 

select
select
End SeLect[

_._____________________

Select 

select
select

SeLect[

_.____________________

Select 

select
elect


SeLect[

_.__________________-

Select  

select  select

SeLect[

_._____


And note this does not cause the problem_....

Select  

select 
select

SeLect[

_.....But if I add spaces after the second select  then I do get the problem.

__._____________________________-


*Weird* . One could play around for hours...   but
*briefly in words thi*s ( inconsistently ) causes problems

*_1 ) 
You need 4 occurrences of select , any case , and three of them must be separated by  an empty line or if not a space after the select will do*

_2 )
If you have a [ after a select then_...
_...- going back from a [ you get the problem  if you have 4 distinct 

Select *otherstuff*

Bits. 


The inconsistency is possibly occurring as the editor eats spaces. So adding them may solve a problem. On the second attempt the spaces are no longer there. ( I am talking about spaces more than one here )

I do not think I have it totally pinned down, and it might be impossible to get there due to the thing being a bit inconsistent.. I will probably add it to my list as the ... *4 Selects occurances can cause problems depending on exactly what else is there and where.*... problem  :Smilie:  

In this case I , in code, would use the black space trick if the problem occurs in a code,    rather than a space , as the VB Editor will not remove that space but rather highlight a syntax problem for the whole line

*Space:*
Sel ect Case WhateverelseherealsoredevenifOKsyntaxly 

*Black character trick* ( before posting make any character or a few characters black )
Select  

se[COLOR="#000000"]l[/COLOR]ect 

se[COLOR="#000000"]lect[/COLOR] case

SeLect[

If I see  the problem in a specific select case select type code I may have another look. For now a solution seems to liberally make  a character or two in any Se*le*cts black ( like this before posting Sel[COLOR="#000000"]e[/COLOR]cts )

Alan

----------


## Doc.AElstein

:Mad:  :Mad:        I should have known....  :Frown: 
This first bit does not post:

... "SELECT  AliArse.[NDB_NO] FROM [Tabelle1$] As AliArse"     "SELECT [t1].NDB_No FROM [" & ThisWorkbook.Path & "\DBSept2016 - first AlanSucces.xlsx].[Tabelle1$] as [t1]"     "SELECT `t1`.NDB_No FROM `" & ThisWorkbook.Path & "\DBSept2016 - first AlanSucces.xlsx`.`Tabelle1$` as `t1`"    "SELECT  t1.`NDB_NO` FROM `Tabelle1$` As t1"
 Let CmdTxtTxt = "SELECT  AliArse.[" & Heading & "] FROM [" & Replace(ShtName, ".", "#", 1, -1) & "$] As AliArse"
'3a(iii) ' Got ya AliArse in and so get ya rows
 Let CmdTxtTxt = Replace(CmdTxtTxt, "SELECT", "SELECT TOP 8810", 1, -1) ' By simply commenting out this line out I have this option   SELECT

_......I should have guessed   .. spot the difference from above and below ( at the start  I apply the black character trick to get it to post !!!). This below will post

... "SE[COLOR="#000000"]L[/COLOR]ECT  AliArse.[NDB_NO] FROM [Tabelle1$] As AliArse"     "SELECT [t1].NDB_No FROM [" & ThisWorkbook.Path & "\DBSept2016 - first AlanSucces.xlsx].[Tabelle1$] as [t1]"     "SELECT `t1`.NDB_No FROM `" & ThisWorkbook.Path & "\DBSept2016 - first AlanSucces.xlsx`.`Tabelle1$` as `t1`"    "SELECT  t1.`NDB_NO` FROM `Tabelle1$` As t1"
 Let CmdTxtTxt = "SELECT  AliArse.[" & Heading & "] FROM [" & Replace(ShtName, ".", "#", 1, -1) & "$] As AliArse"
'3a(iii) ' Got ya AliArse in and so get ya rows
 Let CmdTxtTxt = Replace(CmdTxtTxt, "SELECT", "SELECT TOP 8810", 1, -1) ' By simply commenting out this line out I have this option   SELECT

_.......and I had the pleasure of finding that and applying the Work a round here :  !!!
https://www.excelforum.com/developme...ml#post4626005

_....... Only took an hour or so !!!   :Mad:   :Frown:

----------

