]> git.mxchange.org Git - fba.git/log
fba.git
12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 15:11:13 +0000 (17:11 +0200)]
Continued:
- ValueException is wrong, it is ValueError

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 14:59:56 +0000 (16:59 +0200)]
Continued:
- better checking with .endswith() instead of .split()[-1]
- don't crawl '.tld' domains

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 14:52:20 +0000 (16:52 +0200)]
Continued:
- fixed finding "powered by " (start of string)

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 14:42:49 +0000 (16:42 +0200)]
Continued:
- alias 'nextcloud social' to 'nextcloud'

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 12:16:02 +0000 (14:16 +0200)]
Continued:
- log also domain,origin,blocker

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 12:06:04 +0000 (14:06 +0200)]
Continued:
- empty string changed to None

12 months agoFixed:
Roland Häder [Mon, 12 Jun 2023 11:47:21 +0000 (13:47 +0200)]
Fixed:
- 'redefined-outer-name' lint fixed
- 'bad-indentation ' lint fixed

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 11:29:47 +0000 (13:29 +0200)]
Continued:
- tidyup + validate domains/reasons

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 11:14:34 +0000 (13:14 +0200)]
Continued:
- introduced fba.process_domain() for generic domain processing, please provide
  origin and command

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 10:38:53 +0000 (12:38 +0200)]
Continued:
- tpzo fixed in function name
- also re-check with domain if hash wasn't found
- 'runtube.re' aliased to 'peertube'

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 10:25:17 +0000 (12:25 +0200)]
Continued:
- renamed hash -> blocked_hash to avoid redefining builtin references
- also combined 2 isinstance() into one

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 09:22:57 +0000 (11:22 +0200)]
Continued:
- introduced instances.deobsure() for simple deobscuring attempts, e.g. when
  they use * or ? when they don't want to show the domain, you can still
  deobsfucate it with the hash (some provide it) or obscured domain itself

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 04:25:42 +0000 (06:25 +0200)]
Continued:
- also update last_instance_fetch when software type isn't determined yet
- include command name in log messages

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 03:51:41 +0000 (05:51 +0200)]
Continued:
- moved fba.cache to fba.helpers
- introduced instances.is_recent() so importing long blocklists won't take so
  long

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 03:07:54 +0000 (05:07 +0200)]
Continued:
- added optional --domain parameter to fetch only from one oliphant blocklist
  files

12 months agoWIP:
Roland Häder [Mon, 12 Jun 2023 02:48:04 +0000 (04:48 +0200)]
WIP:
- rewrote from out-dated federater blocklist to multiple up-to-date oliphant
  blocklists
- also prepared for local file support (documentation prepared)

12 months agoContinued:
Roland Häder [Mon, 12 Jun 2023 01:51:23 +0000 (03:51 +0200)]
Continued:
- moved version-related stuff to own helpers module

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 22:39:10 +0000 (00:39 +0200)]
Continued:
- let's collect them all and handle them together, no "generic-catch-all" as
  this would hide actual bugs

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 22:02:46 +0000 (00:02 +0200)]
Continued:
- avoid local variables

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 19:24:48 +0000 (21:24 +0200)]
Continued:
- some Mastodon API responses have no comment in it

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 19:05:52 +0000 (21:05 +0200)]
Continued:
- DEBUG level is enough here, avoids double-logging

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 17:59:08 +0000 (19:59 +0200)]
Continued:
- also cut off trailing double-dot (some people cannot format their data in
  tables properly)
- a wildcat might be at the start of the string, so start checking there for it

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 17:56:16 +0000 (19:56 +0200)]
Continued:
- whole input tag, no matter for what purpose is styled now
- sorted CSS members

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 17:52:36 +0000 (19:52 +0200)]
Continued:
- logic fixed
- debug messages added

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 17:25:49 +0000 (19:25 +0200)]
Continued:
- need to catch exceptions here so more instances can be added with
  software=None

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 17:09:53 +0000 (19:09 +0200)]
Continued:
- reason['reason'] had been handled to tidyup.reason() which caused an error
- it needed to be flexible "detected": str, dict are only supported types for now

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 16:31:22 +0000 (18:31 +0200)]
Continued:
- fixed handling of 404 (no exception) case when nodeinfo wasn't found
- copied (WIP!) fetching /about page to pleroma
- also added /about to /about/more as possible pages for misskey

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 15:57:51 +0000 (17:57 +0200)]
Continued:
- .arpa domains are reverse-ip-address domains and should not be used generally
- please choose a proper domain name, e.g. lemmy.myhomepage.tld

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 15:42:06 +0000 (17:42 +0200)]
Continued:
- always transport causing exception
- some places may still handle it

12 months agoRewrites:
Roland Häder [Sun, 11 Jun 2023 15:03:06 +0000 (17:03 +0200)]
Rewrites:
- rewrote api.api_top() to only 2 parameters, 'mode' and 'amount'
- also remove duplicate `if amount > 500` lines and combined them into one

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 14:39:26 +0000 (16:39 +0200)]
Continued:
- disabled 'duplicate-code' lint check as it found checking parameters as
  duplicated code while it is needed for each function

12 months agoFixes:
Roland Häder [Sun, 11 Jun 2023 13:40:58 +0000 (15:40 +0200)]
Fixes:
- some misskey installations don't return isSuspended/isBlocked fields

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 13:20:43 +0000 (15:20 +0200)]
Continued:
- removed another broad except block
- added missing variable initialization
- there is no 'domain', aka. instance here
- fixed bare-except, you can use 'if foo in bar' instead

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 12:49:07 +0000 (14:49 +0200)]
Continued:
- handle typical network exceptions here, too
- don't sys.exit() here anymore, exit function properly
- don't 'break' here, there was no loop, better return proper error code
- fixed a few problems, found by pylint

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 12:21:57 +0000 (14:21 +0200)]
Continued:
- fetch[_wellknown]_nodeinfo() should return same dict with at least
  'status_code' and 'json' on success and 'error_message' on failure

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 11:26:17 +0000 (13:26 +0200)]
Continued:
- if dict 'error' cannot be handled (their keys) then raise an exception
- put all type(foo) into single quotes
- commented out debug line

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 02:53:42 +0000 (04:53 +0200)]
Continued:
- also need to put a try/except block around csrf.determine() invocations

12 months agoContinued:
Roland Häder [Sun, 11 Jun 2023 02:48:43 +0000 (04:48 +0200)]
Continued:
- forgot to copy-paste error_message check for "blocked"
- also needed to take fetched['json'] for fetched rows

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 22:35:17 +0000 (00:35 +0200)]
Continued:
- some misskey (Chinese) instance returned broken UTF-8, so I had to catch
  UnicodeEncodeError, too

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 22:22:15 +0000 (00:22 +0200)]
Continued:
- both ['error_message'] and ['json']['federated_instances'] is extremely rare

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 18:24:22 +0000 (20:24 +0200)]
Continued:
- at least show the exception name

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 17:56:16 +0000 (19:56 +0200)]
Continued:
- ops, don't copy whole HTML to last_error_message
- also need to initialize local variable 'peers' first

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 17:40:37 +0000 (19:40 +0200)]
Continued:
- no parameter for 'timeout' (here: 'headers' wasn't handled over)

12 months agoWIP(?):
Roland Häder [Sat, 10 Jun 2023 17:32:52 +0000 (19:32 +0200)]
WIP(?):
- moved csrf.determine() of of central functions, it was causing to much CSRF
  checks and slowed down all

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 17:05:40 +0000 (19:05 +0200)]
Continued:
- ops wrong fix

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 16:59:09 +0000 (18:59 +0200)]
Continued:
- DEBUG level + commented out is enough here

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 16:50:26 +0000 (18:50 +0200)]
Continued:
- caught more specific exception and not broad BaseException (still some are
  left)
- renamed variable blocks -> blocking to avoid confusion with imported
  fba.blocks

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 15:57:54 +0000 (17:57 +0200)]
Continued:
- also here need to handle error_message
- fetched['json'] does now contain the rows

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 15:51:55 +0000 (17:51 +0200)]
Continued:
- whyever, but a list is returned, not a dict

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 15:49:35 +0000 (17:49 +0200)]
Continued:
- also catch this exception here, avoiding a lot of more requests to unreachable websites

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 14:38:05 +0000 (16:38 +0200)]
Continued:
- data['json'] now contains the reply

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 14:32:39 +0000 (16:32 +0200)]
Continued:
- still a requests.model.Response might be handled over

12 months agoWIP:
Roland Häder [Sat, 10 Jun 2023 14:29:43 +0000 (16:29 +0200)]
WIP:
- introduced network.fetch_api_url() which takes a whole URL (not domain/path
  separated) and returns it's reply in a json_reply dictionary as both other
  API functions are handling it

12 months agoWIP:
Roland Häder [Sat, 10 Jun 2023 14:14:54 +0000 (16:14 +0200)]
WIP:
- more refacturing away from "generic except blocks"

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 13:27:05 +0000 (15:27 +0200)]
Continued:
- introduced get_json_api() which gives back a dictionary,
- 'status_code' in it is always set, so better test on 'error_message'

12 months agoFixed:
Roland Häder [Sat, 10 Jun 2023 12:06:45 +0000 (14:06 +0200)]
Fixed:
- had to add a 'import reqto' only here to make Python happy
- looks like something in Python internal mapping or so is broken?

12 months agoContinued: broken/missing-import-reqto
Roland Häder [Sat, 10 Jun 2023 11:42:20 +0000 (13:42 +0200)]
Continued:
- first 'rows' was re-assigned with new values, which is typical for Python
- yet still this hasn't fixed the recursion error

12 months agoContinued:
Roland Häder [Sat, 10 Jun 2023 00:10:02 +0000 (02:10 +0200)]
Continued:
- removed redundant initialization of 'blockdict'
- removed local variable 'csrf'

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 22:51:24 +0000 (00:51 +0200)]
Continued:
- updated execution in systemd service file

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 22:49:39 +0000 (00:49 +0200)]
Continued:
- explained why the original website isn't reflecting this code

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 22:32:38 +0000 (00:32 +0200)]
Continued:
- updated README.md

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 21:29:18 +0000 (23:29 +0200)]
Continued:
- removed remains of code around pending_errors dictionary
- rewrote it towards instances.update_last_error()
- also rewrote/removed some try/except blocks

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 18:55:58 +0000 (20:55 +0200)]
Continued:
- markdown is another requirement

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 18:42:53 +0000 (20:42 +0200)]
Continued:
- ops, double commented out
- also peertube may need debugging later on

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 17:52:11 +0000 (19:52 +0200)]
Continued:
- renamed fba/federation/ -> fba/networks/ to make room for ...
- added fba.federation.py module which has generic functions for federation
- introduced fba/locking.py module
- renamed aqcuire_lock() -> aqcuire()
- added locking.release()
- introduced fba/helpers/dict.py and tidyup.py
- renamed tidyu_*() to tidyup.*()
- this all-in-all was an attempt to fix cyclic imports, still some are left

12 months agoWIP:
Roland Häder [Fri, 9 Jun 2023 11:38:13 +0000 (13:38 +0200)]
WIP:
- avoid these generic catches all together and try to catch them individually
  where it makes sense

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 10:08:31 +0000 (12:08 +0200)]
Continued:
- not deleted here ...

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 10:07:38 +0000 (12:07 +0200)]
Continued:
- formatted for shorter lines

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 10:04:53 +0000 (12:04 +0200)]
Continued:
- ops, have forgotten to move this function to own module

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 09:57:40 +0000 (11:57 +0200)]
Continued:
- renaming 'exception' to 'exc' didn't fix the problem, I thought here about
  overlapping/overwriting definitions
- but pylint3 would have it shown anyway

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 09:24:33 +0000 (11:24 +0200)]
Continued:
- eventlet is nowhere used
- need to import jinja2 templating like this

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 08:38:54 +0000 (10:38 +0200)]
Continued:
- fixed logger message

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 08:21:38 +0000 (10:21 +0200)]
Continued:
- ignored more files (tracing, coverage)
- rewrote towards fba.csrf.determine() so it will always be determined, causes
  another request unfortunately
- or can we somehow save the cookie jar ?
- logging of errors can now be disabled for debug purposes

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 04:46:23 +0000 (06:46 +0200)]
Continued:
- fixed more "Undefined variable"

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 04:28:39 +0000 (06:28 +0200)]
Continued:
- fixed bad indenting
- renamed json -> rows to avoid redeclaration with module 'json'
- sorted import members (standard imports first)
- removed unused imports
- fixed "Redefining name 'headers' from outer scope"

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 04:12:38 +0000 (06:12 +0200)]
Continued:
- renamed originator -> command

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 03:45:04 +0000 (05:45 +0200)]
Continued:
- moved headers,api_headers to fba.network module
- fixed more references

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 03:32:23 +0000 (05:32 +0200)]
Continued:
- the repository is more up-to-date, let's fetch this instead
- had to parse the markdown code back to HTML to be able to traverse with
  existing code over it

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 02:42:57 +0000 (04:42 +0200)]
Continued:
- removed some redundant CSS
- also made both :hover color the same
- td's text alignment is now left

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 02:28:29 +0000 (04:28 +0200)]
Continued:
- catch BaseException (very generic catch, but wanted here)

12 months agoFixed some issues found by pylint:
Roland Häder [Fri, 9 Jun 2023 00:50:37 +0000 (02:50 +0200)]
Fixed some issues found by pylint:
- added pylint.rc file (all checks are enabled)
- '!= None' should be 'is not None'
- '== None' should be 'is None'
- '!= type' should be 'not isinstance(var, type)'
- fixed some 'unused variable'
- fixed 'duplicate definition'
- fixed 'invalid name'
- fixed f"foo" with no {var} in it
- renamed more variables

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 00:35:07 +0000 (02:35 +0200)]
Continued:
- moved wrapper functions around reqto.get|post() to module fba/network.py
- renamed get_response() -> fetch_response()

12 months agoContinued:
Roland Häder [Fri, 9 Jun 2023 00:14:39 +0000 (02:14 +0200)]
Continued:
- github.com is not an instance, so let's not confuse some code somewhere

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 23:58:53 +0000 (01:58 +0200)]
Continued:
- added command 'fetch_federater' which fetches a CSV file from github
- if software is null, attempt to determine it
- renamed get_url() to fetch_url()

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 22:15:29 +0000 (00:15 +0200)]
Continued:
- "blocked" needs to be "reject" to be in align with other software

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 19:18:54 +0000 (21:18 +0200)]
Continued:
- added missing check for reason != None
- empty strings are now NoneType, too

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:52:18 +0000 (20:52 +0200)]
Continued:
- explained error code 999
- added missing header for this scoreboard

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:35:52 +0000 (20:35 +0200)]
Continued:
- moved fba.fetch_misskey_blocks() to misskey.fetch_blocks()
- avoided calling tidyup_reason() on NoneType

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:24:46 +0000 (20:24 +0200)]
Continued:
- gotosocial has no open API for instance blocks

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:23:01 +0000 (20:23 +0200)]
Continued:
- ops, oversaw this one

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 18:03:43 +0000 (20:03 +0200)]
Continued:
- some block reasons have a long domain list (which can be taken as
  instance names, too) with no space after a comma
- this causes the web page to be very(!) wide
- added missing "import inspect"
- improved some debug messages

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 17:39:35 +0000 (19:39 +0200)]
Continued:
- added "TOP 30" of error codes (excluding 200)

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 17:07:03 +0000 (19:07 +0200)]
Continued:
- make table border visible

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 16:50:52 +0000 (18:50 +0200)]
Continued:
- also tidyup reason after fetching from instance
- moved validating domain to upper if/elif blocks
- re-color website to more friendlier colors
- rewrote some debug lines

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 14:54:09 +0000 (16:54 +0200)]
Continued:
- "get" should be used only for getters
- removed variable "get_peers_url" which was used only once in code

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 14:43:04 +0000 (16:43 +0200)]
Continued:
- moved templates to templates/views/
- introduced base.html which should be extended by view templates
- TOP x lists now have an own view template

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 06:01:00 +0000 (08:01 +0200)]
Continued:
- moved more instances-related functions to module fba.instances
- also cut of /profile/ and /users/ from paths

12 months agoContinued:
Roland Häder [Thu, 8 Jun 2023 05:38:33 +0000 (07:38 +0200)]
Continued:
- moved and renamed fba.add_instance() to instances.add()

12 months agoContinued:
Roland Häder [Wed, 7 Jun 2023 17:08:09 +0000 (19:08 +0200)]
Continued:
- moved gotosocial part to fba/federation/gotosocial.py
- fixed duplicate variable names

12 months agoContinued:
Roland Häder [Wed, 7 Jun 2023 12:19:14 +0000 (14:19 +0200)]
Continued:
- find_domains() is in module 'fba'