Check-in [d7b8c7f2f3]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Logging function for submit failures |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d7b8c7f2f33d490c8ac0ff2dd7225305 |
User & Date: | mario 2021-12-21 13:49:11 |
Context
2021-12-26
| ||
18:13 | Add fossforce, remove xyz-apps.org (dead for good?, albeit kde had a similar app store now) check-in: eecd325303 user: mario tags: trunk | |
2021-12-21
| ||
13:49 | Logging function for submit failures check-in: d7b8c7f2f3 user: mario tags: trunk | |
13:48 | Log submit failures check-in: 51269b3994 user: mario tags: trunk | |
Changes
Changes to aux.php.
︙ | ︙ | |||
349 350 351 352 353 354 355 | * Trivial check against well-known project spam. * */ function data_blacklisted($release) { $rules = array( "summary" => "/wilmix/i", "submitter" => "/wilmix|jemin/i", | | > > > > > > > > > > > > > > > > | 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | * Trivial check against well-known project spam. * */ function data_blacklisted($release) { $rules = array( "summary" => "/wilmix/i", "submitter" => "/wilmix|jemin/i", "homepage" => "~fmemodules.com|webixytech.com|wilmix|zeesmovie|softwarereviews|diclofenac|viagra|\/\/buy-|fmeextensions|creditloans|casino|cashapp|quickbooks~i", "urls" => "~[gjch]dollar|wilmix~i", "name" => "/DOLLAR|JDollar|Jehovah|Millionaire *s/", "description" => "/invented by|viagra|levitra|tetracycline*s|quickbooks|wilmix|productcustomization|creditloans|web(site)? development (company|service)|<a href=\"/i", ); foreach ($rules as $field => $rx) { if (preg_match($rx, $release[$field])) { return TRUE; } } return random_text_spam($release) or false; } /** * Store into spam/ folder * */ function log_spam($release, $why="spam") { $json = json_encode( [ "release" => $release->__vars, "server" => $_SERVER, "reason" => $why, ], JSON_PRETTY_PRINT ); file_put_contents("./spam/_".microtime(true).".json", $json); } #-- Some string parsing |
︙ | ︙ |
Changes to page_feed.php.
︙ | ︙ | |||
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | // following fields will not be transferred for privacy reasons # "submitter_openid" => $row["submitter_openid"], # "lock" => $row["submitter_lock"], ); } #-- something was requested if ($name = $_GET->proj_name["name"]) { list($name, $ext, ) = explode(".", "$name.json"); $feed = array( | > > > > > | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | // following fields will not be transferred for privacy reasons # "submitter_openid" => $row["submitter_openid"], # "lock" => $row["submitter_lock"], ); } #-- block if (empty($_SERVER["HTTP_USER_AGENT"]) or in_array($_SERVER["REMOTE_ADDR"], $blocked_ip)) { die(header("Status: 412 Precondition Failed")); } #-- something was requested if ($name = $_GET->proj_name["name"]) { list($name, $ext, ) = explode(".", "$name.json"); $feed = array( |
︙ | ︙ |