diff --git a/ChangeLog b/ChangeLog index 1d7a3e99..17d52fe5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24852,3 +24852,6 @@ 2024-08-12 Fred Gleason * Incremented the package version to 4.3.0int3. * Incremented the python api version to 4.3.0.post3. +2024-08-16 Fred Gleason + * Fixed a bug in the RDXport service that couldcause the IMPORT call + to return a 'no such cart' error when trying to create a new cart. diff --git a/web/rdxport/import.cpp b/web/rdxport/import.cpp index a63a6312..4979560c 100644 --- a/web/rdxport/import.cpp +++ b/web/rdxport/import.cpp @@ -102,15 +102,21 @@ void Xport::Import() // // Verify User Perms // - if(RDCart::exists(cartnum)) { - if(!rda->user()->cartAuthorized(cartnum)) { - XmlExit("No such cart",404,"import.cpp",LINE_NUMBER); + if(create&&(cartnum==0)&&(cutnum==0)) { + if(!rda->user()->groupAuthorized(group_name)) { + XmlExit("No such group",404,"import.cpp",LINE_NUMBER); } } else { - if(create) { - if(!rda->user()->groupAuthorized(group_name)) { - XmlExit("No such group",404,"import.cpp",LINE_NUMBER); + if(cartnum==0) { + XmlExit("No such cart",404,"import.cpp",LINE_NUMBER); + } + if(cutnum==0) { + XmlExit("No such cut",404,"import.cpp",LINE_NUMBER); + } + if(RDCart::exists(cartnum)) { + if(!rda->user()->cartAuthorized(cartnum)) { + XmlExit("No such cart",404,"import.cpp",LINE_NUMBER); } } else {