Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/pg-import.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# - update the sogs.ini to change the db to postgres
# - start sogs
#
# This operation is not currently reversible, this script is only ocassionally tested and may be
# This operation is not currently reversible, this script is only occasionally tested and may be
# outdated, and you should not do this unless you know what you are doing.

import psycopg
Expand Down
2 changes: 1 addition & 1 deletion docs/generate-api-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"-o",
"--output",
type=str,
help="Specify output file (or directory, when using -m); specifing a - or omitting outputs to "
help="Specify output file (or directory, when using -m); specifying a - or omitting outputs to "
"stdout, but is not accepted in multi-file (-m) mode.",
)
parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion sogs/migrations/seqno_etc.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def migrate(conn, *, check_only):
raise DatabaseUpgradeRequired("sequence column renames & pinned_messages table")

# We can't insert the required pinned_messages because we don't have the pinned_by user, but
# that isn't a big deal since we didn't have any endpoints for pinned messsages before this
# that isn't a big deal since we didn't have any endpoints for pinned messages before this
# anyway, so we just recreate the whole thing (along with triggers which we also need to
# update/fix)
logging.warning("Recreating pinned_messages table")
Expand Down
2 changes: 1 addition & 1 deletion sogs/model/exc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(self, msg=None):

class InvalidData(RuntimeError):
"""Thrown if something in model was fed invalid data, for example a signature of an invalid
size, or an unparseable entity."""
size, or an unparsable entity."""


class PostRejected(RuntimeError):
Expand Down
2 changes: 1 addition & 1 deletion sogs/model/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def get_messages_for(

whisper_clause = (
# For a mod we want to see:
# - all whisper_mods messsages
# - all whisper_mods messages
# - anything directed to us specifically
# - anything we sent (i.e. outbound whispers)
# - non-whispers
Expand Down
2 changes: 1 addition & 1 deletion sogs/routes/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def handle_http_auth():
touching its last activity timestamp). If there are no auth headers at all this sets g.user to
None.

If authentication headers are present but are unparseable (e.g. wrong size nonce, or failure to
If authentication headers are present but are unparsable (e.g. wrong size nonce, or failure to
decode, or one or more of the headers are missing) then this throws a flask abort with a 400 Bad
Request response. Otherwise this can return a request error of:
- 401 Unauthorized -- invalid signature, for example because of nonce reuse or signature
Expand Down
2 changes: 1 addition & 1 deletion sogs/routes/dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def poll_outbox(msgid):
@auth.blind_user_required
def get_inbox():
"""
Retrieves all of the user's recieved messages (up to `limit`).
Retrieves all of the user's received messages (up to `limit`).
"""
return _box(False)

Expand Down
2 changes: 1 addition & 1 deletion sogs/routes/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
def get_caps():
"""
Return the list of server features/capabilities. Optionally takes a required= parameter
containing a comma-separated list of capabilites; if any are not satisfied we return a 412
containing a comma-separated list of capabilities; if any are not satisfied we return a 412
(Precondition Failed) response with missing requested capabilities in the `missing` key.
"""

Expand Down
2 changes: 1 addition & 1 deletion sogs/routes/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def messages_since(room, seqno):

- `t` — string indicating the types of updates that the client supports, thus allowing the
client to opt-out of update types that it does not yet support. Each letter of the string is
a flag; flags may be specified in any order, and are case-sensistive. Unknown flags are
a flag; flags may be specified in any order, and are case-sensitive. Unknown flags are
ignored by SOGS (to allow for backwards compatibility). Current flags:

- `r` — include message reaction updates
Expand Down
2 changes: 1 addition & 1 deletion sogs/routes/onion_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def handle_v4_onionreq_plaintext(body):

would be encoded as the two-string bencoded list:

l72:{"method":"POST","endpoint":"/some/thing","headers":{"Some-Header":"a"}}14:post body heree
l72:{"method":"POST","endpoint":"/some/thing","headers":{"Some-Header":"a"}}14:post body here
^^^^^^^^72-byte request info json^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^body^^^^^

The return value of the request is always a 2-part bencoded list where the first part contains
Expand Down
2 changes: 1 addition & 1 deletion tests/test_blinding.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from auth import x_sogs


# For test reproducability use this fixed server pubkey for the blinding derivation tests (because
# For test reproducibility use this fixed server pubkey for the blinding derivation tests (because
# each test environment typically has its own, which completely changes the derived pubkeys).
fake_server_pubkey_bytes = bytes.fromhex(
'6a32c7b491f4199dd1260a4cc60ae51c6bd71dad939cc521e738409f53f943be'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def test_pinning(room, room2, user, mod, admin, global_admin, no_rate_limit):
{"id": 6, "pinned_by": global_admin.session_id},
]

# Non-existant id should fail
# Non-existent id should fail
with pytest.raises(exc.NoSuchPost):
room.pin(123, admin)

Expand Down