Loading plugins/media/media.cpp +3 −0 Changes for plugins/media/media.cpp: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -592,10 +592,13 @@ namespace blogi { libhttppp::HttpForm qform; qform.parse(req); for(const auto &qp : qform.urlData()){ std::cerr << "media: query param key='" << qp.key << "' value='" << qp.value << "'" << std::endl; if(qp.key == "w"){ try { reqWidth = std::stoi(qp.value); } catch(...) {} } else if(qp.key == "h"){ try { reqHeight = std::stoi(qp.value); } catch(...) {} } } } std::cerr << "media: mediaId=" << mediaId << " fmt=" << fmt << " reqWidth=" << reqWidth << " reqHeight=" << reqHeight << std::endl; // Validate against allowed preview sizes if(reqWidth > 0 && reqHeight > 0 && !_isSizeAllowed(reqWidth, reqHeight)){ Loading Loading
plugins/media/media.cpp +3 −0 Changes for plugins/media/media.cpp: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -592,10 +592,13 @@ namespace blogi { libhttppp::HttpForm qform; qform.parse(req); for(const auto &qp : qform.urlData()){ std::cerr << "media: query param key='" << qp.key << "' value='" << qp.value << "'" << std::endl; if(qp.key == "w"){ try { reqWidth = std::stoi(qp.value); } catch(...) {} } else if(qp.key == "h"){ try { reqHeight = std::stoi(qp.value); } catch(...) {} } } } std::cerr << "media: mediaId=" << mediaId << " fmt=" << fmt << " reqWidth=" << reqWidth << " reqHeight=" << reqHeight << std::endl; // Validate against allowed preview sizes if(reqWidth > 0 && reqHeight > 0 && !_isSizeAllowed(reqWidth, reqHeight)){ Loading