1
0
Fork 0

Compare commits

...

11 commits

Author SHA1 Message Date
ba1f180c83
Merge pull request #3508 from bookwyrm-social/dependabot/pip/django-4.2.18
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Templates validator / lint (push) Has been cancelled
JavaScript Prettier (run ./bw-dev prettier to fix) / Lint with Prettier (push) Has been cancelled
Python / Tests (pytest) (push) Has been cancelled
Python / Linting (pylint) (push) Has been cancelled
Python / Typing (mypy) (push) Has been cancelled
Python / Formatting (black; run ./bw-dev black to fix) (push) Has been cancelled
Bump django from 4.2.17 to 4.2.18
2025-02-13 20:05:13 -08:00
dependabot[bot]
924f377e4e
Bump django from 4.2.17 to 4.2.18
Bumps [django](https://github.com/django/django) from 4.2.17 to 4.2.18.
- [Commits](https://github.com/django/django/compare/4.2.17...4.2.18)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-14 03:14:17 +00:00
eef66b5fc4
Merge pull request #3507 from bookwyrm-social/update-linter-ubuntu
GitHub emailed me to say we need to use a later ubuntu version for these
2025-02-13 19:13:28 -08:00
4138a2b6aa GitHub emailed me to say we need to use a later ubuntu version for these 2025-02-13 18:39:40 -08:00
03bab92ee6
Merge pull request #3492 from bookwyrm-social/inventaire-titles
Alters get_description code for inventaire queries
2025-01-10 18:21:17 -08:00
d9d614b3bc Updates test string for inventaire 2025-01-10 18:11:57 -08:00
609b7f58c8 Alters get_description code for inventaire queries 2025-01-10 18:01:48 -08:00
3916666897
Merge pull request #3478 from bookwyrm-social/dependabot/pip/django-4.2.17
Bump django from 4.2.16 to 4.2.17
2024-12-06 16:15:01 -08:00
dependabot[bot]
305ef9195b
Bump django from 4.2.16 to 4.2.17
Bumps [django](https://github.com/django/django) from 4.2.16 to 4.2.17.
- [Commits](https://github.com/django/django/compare/4.2.16...4.2.17)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-06 18:58:00 +00:00
de8ba3cf86
Merge pull request #3476 from hughrun/block-invites
Prevent invite requests from blocked domains
2024-11-30 19:25:03 -08:00
023e62294e
Prevent invite requests from blocked domains
Prevents form submission when requesting an email invite using an address from a blocked domain.

Fixes #3366
2024-11-30 15:54:37 +11:00
6 changed files with 13 additions and 6 deletions

View file

@ -15,7 +15,7 @@ on:
jobs: jobs:
lint: lint:
name: Lint with stylelint and ESLint. name: Lint with stylelint and ESLint.
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.

View file

@ -10,7 +10,7 @@ on:
jobs: jobs:
lint: lint:
name: Lint with Prettier name: Lint with Prettier
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.

View file

@ -222,9 +222,10 @@ class Connector(AbstractConnector):
def get_description(self, links: JsonDict) -> str: def get_description(self, links: JsonDict) -> str:
"""grab an extracted excerpt from wikipedia""" """grab an extracted excerpt from wikipedia"""
link = links.get("enwiki") link = links.get("enwiki")
if not link: if not link or not link.get("title"):
return "" return ""
url = f"{self.base_url}/api/data?action=wp-extract&lang=en&title={link}" title = link.get("title")
url = f"{self.base_url}/api/data?action=wp-extract&lang=en&title={title}"
try: try:
data = get_data(url) data = get_data(url)
except ConnectorException: except ConnectorException:

View file

@ -64,6 +64,10 @@ class InviteRequestForm(CustomForm):
if email and models.User.objects.filter(email=email).exists(): if email and models.User.objects.filter(email=email).exists():
self.add_error("email", _("A user with this email already exists.")) self.add_error("email", _("A user with this email already exists."))
email_domain = email.split("@")[-1]
if email and models.EmailBlocklist.objects.filter(domain=email_domain).exists():
self.add_error("email", _("This email address cannot be registered."))
class Meta: class Meta:
model = models.InviteRequest model = models.InviteRequest
fields = ["email", "answer"] fields = ["email", "answer"]

View file

@ -273,7 +273,9 @@ class Inventaire(TestCase):
json={"extract": "hi hi"}, json={"extract": "hi hi"},
) )
extract = self.connector.get_description({"enwiki": "test_path"}) extract = self.connector.get_description(
{"enwiki": {"title": "test_path", "badges": "hello"}}
)
self.assertEqual(extract, "hi hi") self.assertEqual(extract, "hi hi")
def test_remote_id_from_model(self): def test_remote_id_from_model(self):

View file

@ -4,7 +4,7 @@ boto3==1.34.74
bw-file-resubmit==0.6.0rc2 bw-file-resubmit==0.6.0rc2
celery==5.3.6 celery==5.3.6
colorthief==0.2.1 colorthief==0.2.1
Django==4.2.16 Django==4.2.18
django-celery-beat==2.6.0 django-celery-beat==2.6.0
django-compressor==4.4 django-compressor==4.4
django-csp==3.8 django-csp==3.8