Commit graph

10 commits

Author SHA1 Message Date
Roger A. Light
a02aad0a9c Add mosquitto_sub_matches_acl_with_pattern. 2021-07-08 17:45:50 +01:00
Roger A. Light
e0309acebc Add mosquitto_sub_matches_acl()
This moves the sub matching sub code from the dynsec plugin to the library and broker, and removes all of the malloc calls at the same time.
2021-06-10 22:19:39 +01:00
Roger A. Light
b3045d1adf Fix pattern matching with invalid prefix. 2021-06-10 22:19:39 +01:00
Roger A. Light
6502d6e5f4 Add mosquitto_topic_matches_sub_with_pattern()
And use it in the default security checks.
2021-06-10 15:33:01 +01:00
Roger A. Light
8d5fd7d1e2 Fix mosquitto_topic_matches_sub() behaviour with wildcards in topic.
It was not returning MOSQ_ERR_INVAL if the topic contains a wildcard.

Closes #1589. Thanks to mdelete.
2020-02-07 22:55:50 +00:00
Roger A. Light
bb914b985c Fix mosquitto_topic_matches_sub() rc with sub=="topic/#abc".
This now returns MOSQ_ERR_INVAL as expected.
2019-02-12 11:34:45 +00:00
Roger A. Light
42896112a1 Pub/sub topic checking tests. 2018-10-16 23:09:08 +01:00
Roger A. Light
40ed672ecf Fix topic matching tests and function. 2018-10-16 22:49:13 +01:00
Roger A. Light
a7fff2ad2e Topic test improvements. 2018-10-16 13:49:38 +01:00
Roger A. Light
6609bbac10 Move topic matching tests to unit tests. Needs improving. 2018-10-10 17:52:41 +01:00