Project

Profile

Help

Issue #5330

Updated by ppicka about 5 years ago

As now used urlpatterns check only ending of url : 

 <pre><code class="python"> 
 urlpatterns = [ 
     url(r'rpm/upload/$', url(r'rpm/upload/*$*', OneShotUploadViewSet.as_view({'post': 'create'})), 
     url(r'rpm/copy/$', url(r'rpm/copy/*$*', CopyViewSet.as_view({'post': 'create'})), 
     url(r'modulemd/upload/$', url(r'modulemd/upload/*$*', ModuleOneShotUpload.as_view({'post': 'create'})) 
 ] 
 </code></pre> 

 it is possible to use them in strange ways : 
 <pre><code class="python"> 
 http --form POST :24817/pulp/api/v3/sdfghjkl/modulemd/upload/ file@./fedora.yaml.gz 
 </code></pre> 
 works same as  
 <pre><code class="python"> 
 http --form POST :24817/pulp/api/v3/modulemd/upload/ file@./fedora.yaml.gz 
 </code></pre> 

 We should allow users to use only one way as other api calls starts with "/pulp/api/v3/..." 

Back