Fossil SCM
Rearrange fields in the Robot Defense setup to make it easier to understand.
Commit
58a48e3abe444fb675ece04d53d634ccbbfaf6551785e209083c889c0dbdb6ed
Parent
5d040f1ff00c552…
1 file changed
+17
-35
+17
-35
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -421,56 +421,38 @@ | ||
| 421 | 421 | }; |
| 422 | 422 | multiple_choice_attribute( |
| 423 | 423 | "Enable hyperlinks base on User-Agent and/or Javascript", |
| 424 | 424 | "auto-hyperlink", "autohyperlink", "1", |
| 425 | 425 | count(azDefenseOpts)/2, azDefenseOpts); |
| 426 | - @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users, | |
| 427 | - @ including user "nobody", as long as the User-Agent string in the | |
| 428 | - @ HTTP header indicates that the request is coming from an actual human | |
| 429 | - @ being. If this setting is "UserAgent only" (2) then the | |
| 430 | - @ UserAgent string is the only factor considered. If the value of this | |
| 431 | - @ setting is "UserAgent And Javascript" (1) then Javascript is added that | |
| 432 | - @ runs after the page loads and fills in the href= values of <a> | |
| 433 | - @ elements. In either case, <a> tags are only generated if the | |
| 434 | - @ UserAgent string indicates that the request is coming from a human and | |
| 435 | - @ not a robot. | |
| 436 | - @ | |
| 437 | - @ <p>This setting is designed to give easy access to humans while | |
| 438 | - @ keeping out robots. | |
| 439 | - @ You do not normally want a robot to walk your entire repository because | |
| 440 | - @ if it does, your server will end up computing diffs and annotations for | |
| 441 | - @ every historical version of every file and creating ZIPs and tarballs of | |
| 442 | - @ every historical check-in, which can use a lot of CPU and bandwidth | |
| 443 | - @ even for relatively small projects.</p> | |
| 444 | - @ | |
| 445 | - @ <p>The "UserAgent and Javascript" value for this setting provides | |
| 446 | - @ superior protection from robots. However, that setting also prevents | |
| 447 | - @ the visited/unvisited colors on hyperlinks from displaying correctly | |
| 448 | - @ on Safari-derived browsers. (Chrome and Firefox work fine.) Since | |
| 449 | - @ Safari is the underlying rendering engine on all iPhones and iPads, | |
| 450 | - @ this means that hyperlink visited/unvisited colors will not operate | |
| 451 | - @ on those platforms when "UserAgent and Javascript" is selected.</p> | |
| 452 | - @ | |
| 453 | - @ <p>Additional parameters that control the behavior of Javascript:</p> | |
| 454 | - @ <blockquote> | |
| 426 | + @ <br> | |
| 455 | 427 | entry_attribute("Delay in milliseconds before enabling hyperlinks", 5, |
| 456 | 428 | "auto-hyperlink-delay", "ah-delay", "50", 0); |
| 457 | 429 | @ <br> |
| 458 | 430 | onoff_attribute("Also require a mouse event before enabling hyperlinks", |
| 459 | 431 | "auto-hyperlink-mouseover", "ahmo", 0, 0); |
| 460 | - @ </blockquote> | |
| 432 | + @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users, | |
| 433 | + @ including user "nobody" if the request appears to be from a human. | |
| 434 | + @ Disabling hyperlinks helps prevent robots from walking your site and | |
| 435 | + @ soaking up all your CPU and bandwidth. | |
| 436 | + @ If this setting is "UserAgent only" (2) then the | |
| 437 | + @ UserAgent string is the only factor considered. If the value of this | |
| 438 | + @ setting is "UserAgent And Javascript" (1) then Javascript is added that | |
| 439 | + @ runs after the page loads and fills in the href= values of <a> | |
| 440 | + @ elements. In either case, <a> tags are not generated if the | |
| 441 | + @ UserAgent string indicates that the client is a robot. | |
| 442 | + @ (Property: "auto-hyperlink")</p> | |
| 443 | + @ | |
| 461 | 444 | @ <p>For maximum robot defense, "Delay" should be at least 50 milliseconds |
| 462 | 445 | @ and "require a mouse event" should be turned on. These values only come |
| 463 | 446 | @ into play when the main auto-hyperlink settings is 2 ("UserAgent and |
| 464 | - @ Javascript").</p> | |
| 447 | + @ Javascript"). | |
| 448 | + @ (Properties: "auto-hyperlink-delay" and "auto-hyperlink-mouseover")</p> | |
| 465 | 449 | @ |
| 466 | 450 | @ <p>To see if Javascript-base hyperlink enabling mechanism is working, |
| 467 | - @ visit the <a href="%R/test-env">/test-env</a> page (from a separate | |
| 468 | - @ web browser that is not logged in, even as "anonymous") and verify | |
| 451 | + @ visit the <a href="%R/test-env">/test-env</a> page from a separate | |
| 452 | + @ web browser that is not logged in, even as "anonymous" and verify | |
| 469 | 453 | @ that the "g.jsHref" value is "1".</p> |
| 470 | - @ <p>(Properties: "auto-hyperlink", "auto-hyperlink-delay", and | |
| 471 | - @ "auto-hyperlink-mouseover"")</p> | |
| 472 | 454 | } |
| 473 | 455 | |
| 474 | 456 | /* |
| 475 | 457 | ** WEBPAGE: setup_robot |
| 476 | 458 | ** |
| 477 | 459 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -421,56 +421,38 @@ | |
| 421 | }; |
| 422 | multiple_choice_attribute( |
| 423 | "Enable hyperlinks base on User-Agent and/or Javascript", |
| 424 | "auto-hyperlink", "autohyperlink", "1", |
| 425 | count(azDefenseOpts)/2, azDefenseOpts); |
| 426 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users, |
| 427 | @ including user "nobody", as long as the User-Agent string in the |
| 428 | @ HTTP header indicates that the request is coming from an actual human |
| 429 | @ being. If this setting is "UserAgent only" (2) then the |
| 430 | @ UserAgent string is the only factor considered. If the value of this |
| 431 | @ setting is "UserAgent And Javascript" (1) then Javascript is added that |
| 432 | @ runs after the page loads and fills in the href= values of <a> |
| 433 | @ elements. In either case, <a> tags are only generated if the |
| 434 | @ UserAgent string indicates that the request is coming from a human and |
| 435 | @ not a robot. |
| 436 | @ |
| 437 | @ <p>This setting is designed to give easy access to humans while |
| 438 | @ keeping out robots. |
| 439 | @ You do not normally want a robot to walk your entire repository because |
| 440 | @ if it does, your server will end up computing diffs and annotations for |
| 441 | @ every historical version of every file and creating ZIPs and tarballs of |
| 442 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 443 | @ even for relatively small projects.</p> |
| 444 | @ |
| 445 | @ <p>The "UserAgent and Javascript" value for this setting provides |
| 446 | @ superior protection from robots. However, that setting also prevents |
| 447 | @ the visited/unvisited colors on hyperlinks from displaying correctly |
| 448 | @ on Safari-derived browsers. (Chrome and Firefox work fine.) Since |
| 449 | @ Safari is the underlying rendering engine on all iPhones and iPads, |
| 450 | @ this means that hyperlink visited/unvisited colors will not operate |
| 451 | @ on those platforms when "UserAgent and Javascript" is selected.</p> |
| 452 | @ |
| 453 | @ <p>Additional parameters that control the behavior of Javascript:</p> |
| 454 | @ <blockquote> |
| 455 | entry_attribute("Delay in milliseconds before enabling hyperlinks", 5, |
| 456 | "auto-hyperlink-delay", "ah-delay", "50", 0); |
| 457 | @ <br> |
| 458 | onoff_attribute("Also require a mouse event before enabling hyperlinks", |
| 459 | "auto-hyperlink-mouseover", "ahmo", 0, 0); |
| 460 | @ </blockquote> |
| 461 | @ <p>For maximum robot defense, "Delay" should be at least 50 milliseconds |
| 462 | @ and "require a mouse event" should be turned on. These values only come |
| 463 | @ into play when the main auto-hyperlink settings is 2 ("UserAgent and |
| 464 | @ Javascript").</p> |
| 465 | @ |
| 466 | @ <p>To see if Javascript-base hyperlink enabling mechanism is working, |
| 467 | @ visit the <a href="%R/test-env">/test-env</a> page (from a separate |
| 468 | @ web browser that is not logged in, even as "anonymous") and verify |
| 469 | @ that the "g.jsHref" value is "1".</p> |
| 470 | @ <p>(Properties: "auto-hyperlink", "auto-hyperlink-delay", and |
| 471 | @ "auto-hyperlink-mouseover"")</p> |
| 472 | } |
| 473 | |
| 474 | /* |
| 475 | ** WEBPAGE: setup_robot |
| 476 | ** |
| 477 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -421,56 +421,38 @@ | |
| 421 | }; |
| 422 | multiple_choice_attribute( |
| 423 | "Enable hyperlinks base on User-Agent and/or Javascript", |
| 424 | "auto-hyperlink", "autohyperlink", "1", |
| 425 | count(azDefenseOpts)/2, azDefenseOpts); |
| 426 | @ <br> |
| 427 | entry_attribute("Delay in milliseconds before enabling hyperlinks", 5, |
| 428 | "auto-hyperlink-delay", "ah-delay", "50", 0); |
| 429 | @ <br> |
| 430 | onoff_attribute("Also require a mouse event before enabling hyperlinks", |
| 431 | "auto-hyperlink-mouseover", "ahmo", 0, 0); |
| 432 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users, |
| 433 | @ including user "nobody" if the request appears to be from a human. |
| 434 | @ Disabling hyperlinks helps prevent robots from walking your site and |
| 435 | @ soaking up all your CPU and bandwidth. |
| 436 | @ If this setting is "UserAgent only" (2) then the |
| 437 | @ UserAgent string is the only factor considered. If the value of this |
| 438 | @ setting is "UserAgent And Javascript" (1) then Javascript is added that |
| 439 | @ runs after the page loads and fills in the href= values of <a> |
| 440 | @ elements. In either case, <a> tags are not generated if the |
| 441 | @ UserAgent string indicates that the client is a robot. |
| 442 | @ (Property: "auto-hyperlink")</p> |
| 443 | @ |
| 444 | @ <p>For maximum robot defense, "Delay" should be at least 50 milliseconds |
| 445 | @ and "require a mouse event" should be turned on. These values only come |
| 446 | @ into play when the main auto-hyperlink settings is 2 ("UserAgent and |
| 447 | @ Javascript"). |
| 448 | @ (Properties: "auto-hyperlink-delay" and "auto-hyperlink-mouseover")</p> |
| 449 | @ |
| 450 | @ <p>To see if Javascript-base hyperlink enabling mechanism is working, |
| 451 | @ visit the <a href="%R/test-env">/test-env</a> page from a separate |
| 452 | @ web browser that is not logged in, even as "anonymous" and verify |
| 453 | @ that the "g.jsHref" value is "1".</p> |
| 454 | } |
| 455 | |
| 456 | /* |
| 457 | ** WEBPAGE: setup_robot |
| 458 | ** |
| 459 |