Skip to content

add validations against smpp spec. #129

@komuw

Description

@komuw

we should validate for user input.
naz has two places where it can get data from the outside(ie from app developers)

  1. naz/naz/client.py

    Lines 1108 to 1111 in 14fe3be

    async def submit_sm(
    self, short_message: str, log_id: str, source_addr: str, destination_addr: str
    ) -> None:
    """

  2. naz/naz/client.py

    Lines 1523 to 1525 in 14fe3be

    async def dequeue_messages(
    self, TESTING: bool = False
    ) -> typing.Union[str, typing.Dict[typing.Any, typing.Any]]:

So we know for example that according to the spec, a source_addr should be a str of maximum 21 octets/bytes;

naz/naz/client.py

Line 1133 in 14fe3be

# source_addr, c-octet str, max 21octet. eg; This is usually the senders phone Number

We should validate for that

Note; naz can also get data from SMSC, but for now we will treat an SMSC as a trusted party.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions