@@ -231,119 +231,4 @@ module Werkzeug {
231231 override string getAsyncMethodName ( ) { none ( ) }
232232 }
233233 }
234-
235- import WerkzeugOld
236- }
237-
238- /**
239- * Old version that contains the deprecated modules.
240- */
241- private module WerkzeugOld {
242- /**
243- * DEPRECATED: Use the modeling available directly in the `Werkzeug` module instead.
244- *
245- * Provides models for the `werkzeug` module.
246- */
247- deprecated module werkzeug {
248- /**
249- * DEPRECATED: Use the modeling available directly in the `Werkzeug` module instead.
250- *
251- * Provides models for the `werkzeug.datastructures` module.
252- */
253- deprecated module datastructures {
254- /**
255- * DEPRECATED: Use `Werkzeug::MultiDict` instead.
256- *
257- * Provides models for the `werkzeug.datastructures.MultiDict` class
258- *
259- * See https://werkzeug.palletsprojects.com/en/1.0.x/datastructures/#werkzeug.datastructures.MultiDict.
260- */
261- deprecated module MultiDict {
262- /**
263- * DEPRECATED. Use `Werkzeug::MultiDict::InstanceSource` instead.
264- *
265- * A source of instances of `werkzeug.datastructures.MultiDict`, extend this class to model new instances.
266- *
267- * This can include instantiations of the class, return values from function
268- * calls, or a special parameter that will be set when functions are called by an external
269- * library.
270- *
271- * Use the predicate `MultiDict::instance()` to get references to instances of `werkzeug.datastructures.MultiDict`.
272- */
273- abstract deprecated class InstanceSourceApiNode extends API:: Node { }
274-
275- /**
276- * DEPRECATED
277- *
278- * Gets a reference to the `getlist` method on an instance of `werkzeug.datastructures.MultiDict`.
279- *
280- * See https://werkzeug.palletsprojects.com/en/1.0.x/datastructures/#werkzeug.datastructures.Headers.getlist
281- */
282- deprecated DataFlow:: Node getlist ( ) {
283- result = any ( InstanceSourceApiNode a ) .getMember ( "getlist" ) .getAValueReachableFromSource ( )
284- }
285-
286- private class MultiDictAdditionalTaintStep extends TaintTracking:: AdditionalTaintStep {
287- override predicate step ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
288- // obj -> obj.getlist
289- exists ( DataFlow:: AttrRead read |
290- read .getObject ( ) = nodeFrom and
291- nodeTo = read and
292- nodeTo = getlist ( )
293- )
294- or
295- // getlist -> getlist()
296- nodeFrom = getlist ( ) and
297- nodeTo .( DataFlow:: CallCfgNode ) .getFunction ( ) = nodeFrom
298- }
299- }
300- }
301-
302- /**
303- * DEPRECATED: Use `Werkzeug::FileStorage` instead.
304- *
305- * Provides models for the `werkzeug.datastructures.FileStorage` class
306- *
307- * See https://werkzeug.palletsprojects.com/en/1.0.x/datastructures/#werkzeug.datastructures.FileStorage.
308- */
309- deprecated module FileStorage {
310- /**
311- * DEPRECATED. Use `Werkzeug::FileStorage::InstanceSource` instead.
312- *
313- * A source of instances of `werkzeug.datastructures.FileStorage`, extend this class to model new instances.
314- *
315- * This can include instantiations of the class, return values from function
316- * calls, or a special parameter that will be set when functions are called by an external
317- * library.
318- *
319- * Use the predicate `FileStorage::instance()` to get references to instances of `werkzeug.datastructures.FileStorage`.
320- */
321- abstract deprecated class InstanceSourceApiNode extends API:: Node { }
322-
323- /** Gets a reference to an instance of `werkzeug.datastructures.FileStorage`. */
324- deprecated DataFlow:: Node instance ( ) {
325- result = any ( InstanceSourceApiNode a ) .getAValueReachableFromSource ( )
326- }
327-
328- private class FileStorageAdditionalTaintStep extends TaintTracking:: AdditionalTaintStep {
329- override predicate step ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
330- nodeFrom = instance ( ) and
331- exists ( DataFlow:: AttrRead read | nodeTo = read |
332- read .getAttributeName ( ) in [
333- // str
334- "filename" , "name" , "content_type" , "mimetype" ,
335- // file-like
336- "stream" ,
337- // TODO: werkzeug.datastructures.Headers
338- "headers" ,
339- // dict[str, str]
340- "mimetype_params"
341- ] and
342- read .getObject ( ) = nodeFrom
343- )
344- }
345- }
346- }
347- }
348- }
349234}
0 commit comments