Skip to content

Commit

Permalink
Change repository licence to AGPL (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre authored Nov 19, 2024
1 parent 9b859b3 commit 11fa1e1
Show file tree
Hide file tree
Showing 32 changed files with 726 additions and 499 deletions.
836 changes: 660 additions & 176 deletions LICENSE

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ version = "1.1.0"
description = "A web service for scanning media hosted by a Matrix media repository"
authors = ["Element Backend Team <[email protected]>"]
readme = "README.md"
license = "Apache-2.0"
classifiers = [
"License :: OSI Approved :: Apache Software License",
]
license = "AGPL-3.0-only"
# Python version and licence classifiers are set automatically by Poetry
classifiers = []
include = [
{ path = "mypy.ini", format = "sdist" },
{ path = "scripts-dev", format = "sdist" },
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.

from matrix_content_scanner.utils.rust import check_rust_lib_up_to_date

Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/config.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from typing import Any, Dict, List, Optional, Union

import attr
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/httpserver.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
import logging
from typing import TYPE_CHECKING, Awaitable, Callable

Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/logutils.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
import logging
from contextvars import ContextVar
from typing import Any
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/mcs.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
import argparse
import logging
import sys
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/scanner/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/scanner/file_downloader.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
import json
import logging
import urllib.parse
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/scanner/scanner.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
import asyncio
import hashlib
import logging
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/servlets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
import functools
import json
import logging
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/servlets/download.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from typing import TYPE_CHECKING, Optional, Tuple

from aiohttp import web
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/servlets/public_key.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from typing import TYPE_CHECKING, Tuple

from aiohttp import web
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/servlets/scan.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from typing import TYPE_CHECKING, Optional, Tuple

from aiohttp import web
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/servlets/thumbnail.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from typing import TYPE_CHECKING, Tuple

from aiohttp import web
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/utils/constants.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from enum import Enum


Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/utils/encrypted_file_metadata.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from jsonschema import ValidationError, validate

from matrix_content_scanner.utils.constants import ErrCode
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/utils/errors.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from typing import Optional

from matrix_content_scanner.utils.constants import ErrCode
Expand Down
5 changes: 5 additions & 0 deletions src/matrix_content_scanner/utils/rust.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright 2024 New Vector Ltd
#
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.

import os
import sys
from hashlib import blake2b
Expand Down
13 changes: 2 additions & 11 deletions src/matrix_content_scanner/utils/types.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
from typing import Any, Dict

import attr
Expand Down
13 changes: 2 additions & 11 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
13 changes: 2 additions & 11 deletions tests/scanner/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# Copyright 2022 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: AGPL-3.0-only
# Please see LICENSE in the repository root for full details.
Loading

0 comments on commit 11fa1e1

Please sign in to comment.