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

registrar: Fix check of contact length and make it configurable #725

Merged
merged 3 commits into from Jul 27, 2016

Conversation

AndreasHuber-CH
Copy link
Contributor

I split the pull request in three commits to seperate the fix from the new feature, but they go together so I propose them in the same pull request:

cc0b07d: I added some log message that would have helped me to understand a 400 Bad Request response.
c0697d7: I fixed a bug that were the contact size is not checked on the first header field and 200 OK is sent instead of 400 Bad Request for too long contact URIs but the uri ends up beein truncated by the database.
eb6b9c6: I made the contact size configurable to allow longer contacts

AndreasHuber-CH added 3 commits July 26, 2016 08:41
…jected

Added some warnings in case a REGISTER is rejected because of an invalid contact header field.
Before, kamailio might answer a 400 Bad Request for a too long contact URI for example without logging any message.
The URI size of contacts is checked against a max size to ensure that it fits into the database column.
This check was already present before but was done only for the contact header fields other than the first header field
which made that REGISTER with a single contact were not checked for max size and were truncated later when stored to the database.
With this fix all contact URIs of all contact header fields are checked against the max size.
…t size configurable

The new module parameter "contact_max_size" allows changing the max size of contact URIs
that are accepted in REGISTER requests.
The default value of this parameter is 255 which was the value of the compile time constant
that is replaced by this module parameter.
If configured one must make sure that the DB actually supports the configured size in the
column "contact".
@miconda
Copy link
Member

miconda commented Jul 27, 2016

Thanks!

@miconda miconda merged commit 4af08be into kamailio:master Jul 27, 2016
@AndreasHuber-CH AndreasHuber-CH deleted the contact_length branch July 29, 2016 06:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants