from django.conf.urls import url
from corehq.messaging.smsbackends.trumpia.views import TrumpiaIncomingView


urlpatterns = [
    url(r'^sms/(?P<api_key>[\w-]+)/?$', TrumpiaIncomingView.as_view(),
        name=TrumpiaIncomingView.urlname),
]

from django.conf.urls import url

from corehq.apps.hqwebapp.decorators import waf_allow
from corehq.messaging.smsbackends.trumpia.views import TrumpiaIncomingView


urlpatterns = [
    url(r'^sms/(?P<api_key>[\w-]+)/?$', waf_allow('XSS_QUERYSTRING')(TrumpiaIncomingView.as_view()),
        name=TrumpiaIncomingView.urlname),
]

Annotate trumpia url to say it allows XML in the querystring
Annotate trumpia url to say it allows XML in the querystring

  from django.conf.urls import url
+ 
+ from corehq.apps.hqwebapp.decorators import waf_allow
  from corehq.messaging.smsbackends.trumpia.views import TrumpiaIncomingView
  
  
  urlpatterns = [
-     url(r'^sms/(?P<api_key>[\w-]+)/?$', TrumpiaIncomingView.as_view(),
+     url(r'^sms/(?P<api_key>[\w-]+)/?$', waf_allow('XSS_QUERYSTRING')(TrumpiaIncomingView.as_view()),
          name=TrumpiaIncomingView.urlname),
  ]
  
Annotate trumpia url to say it allows XML in the querystring
## Code Before:
from django.conf.urls import url
from corehq.messaging.smsbackends.trumpia.views import TrumpiaIncomingView


urlpatterns = [
    url(r'^sms/(?P<api_key>[\w-]+)/?$', TrumpiaIncomingView.as_view(),
        name=TrumpiaIncomingView.urlname),
]

## Instruction:
Annotate trumpia url to say it allows XML in the querystring
## Code After:
from django.conf.urls import url

from corehq.apps.hqwebapp.decorators import waf_allow
from corehq.messaging.smsbackends.trumpia.views import TrumpiaIncomingView


urlpatterns = [
    url(r'^sms/(?P<api_key>[\w-]+)/?$', waf_allow('XSS_QUERYSTRING')(TrumpiaIncomingView.as_view()),
        name=TrumpiaIncomingView.urlname),
]
