Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add validations against smpp spec. #129

Open
komuw opened this issue Jun 1, 2019 · 0 comments
Open

add validations against smpp spec. #129

komuw opened this issue Jun 1, 2019 · 0 comments

Comments

@komuw
Copy link
Owner

komuw commented Jun 1, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant