Fossil SCM

Add a PD_NoBot() check to /timeline, based on spider attack records.

stephan 2023-02-10 17:38 trunk
Commit 3fa6f8f09ad4fed9f9a7754fa51a09665ddd63f3e671c7d09b596c915f3b15a5
1 file changed +3
--- src/timeline.c
+++ src/timeline.c
@@ -1698,10 +1698,13 @@
16981698
int haveParameterN; /* True if n= query parameter present */
16991699
17001700
url_initialize(&url, "timeline");
17011701
cgi_query_parameters_to_url(&url);
17021702
1703
+ (void)P_NoBot("ss")
1704
+ /* "ss" is processed via the udc but at least one spider likes to
1705
+ ** try to SQL inject via this argument, so let's catch that. */;
17031706
17041707
/* Set number of rows to display */
17051708
z = P("n");
17061709
if( z!=0 ){
17071710
haveParameterN = 1;
17081711
--- src/timeline.c
+++ src/timeline.c
@@ -1698,10 +1698,13 @@
1698 int haveParameterN; /* True if n= query parameter present */
1699
1700 url_initialize(&url, "timeline");
1701 cgi_query_parameters_to_url(&url);
1702
 
 
 
1703
1704 /* Set number of rows to display */
1705 z = P("n");
1706 if( z!=0 ){
1707 haveParameterN = 1;
1708
--- src/timeline.c
+++ src/timeline.c
@@ -1698,10 +1698,13 @@
1698 int haveParameterN; /* True if n= query parameter present */
1699
1700 url_initialize(&url, "timeline");
1701 cgi_query_parameters_to_url(&url);
1702
1703 (void)P_NoBot("ss")
1704 /* "ss" is processed via the udc but at least one spider likes to
1705 ** try to SQL inject via this argument, so let's catch that. */;
1706
1707 /* Set number of rows to display */
1708 z = P("n");
1709 if( z!=0 ){
1710 haveParameterN = 1;
1711

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button