7b7b6121a7fe03d9af2e1a78f3d03ae27d70d13f,w3af/plugins/audit/file_upload.py,file_upload,_generate_urls,#file_upload#,158

Before Change


                                   the server
        :return: A list of paths where the file could be.
        
        seen = []

        for url in domain_path_set:
            for default_path in self.UPLOAD_PATHS:
                for sub_url in url.get_directories():

After Change


        def sort_by_len(a, b):
            return cmp(len(b.url_string), len(a.url_string))

        domain_path_list = list(domain_path_set)
        domain_path_list.sort(sort_by_len)

        for url in domain_path_list:
            for common_path in self.UPLOAD_PATHS:
                possible_location = url.url_join(common_path + "/")
                possible_location = possible_location.url_join(uploaded_file_name)

                if not seen.contains(possible_location):
                    yield possible_location
                    seen.append(possible_location)

    def get_options(self):
        
        :return: A list of option objects for this plugin.
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: andresriancho/w3af
Commit Name: 7b7b6121a7fe03d9af2e1a78f3d03ae27d70d13f
Time: 2017-11-29
Author: andres.riancho@gmail.com
File Name: w3af/plugins/audit/file_upload.py
Class Name: file_upload
Method Name: _generate_urls


Project Name: nilmtk/nilmtk
Commit Name: 72f3f5bf50ed2d91cdcfbe2cf47120a2df8883cd
Time: 2014-11-26
Author: jack-list@xlk.org.uk
File Name: nilmtk/elecmeter.py
Class Name: ElecMeter
Method Name: _get_stat_from_cache_or_compute


Project Name: explosion/spaCy
Commit Name: daa8c3787a61ebbb5786b6496aa4ab3f15c83f5c
Time: 2019-03-16
Author: honnibal+gh@gmail.com
File Name: spacy/cli/train.py
Class Name:
Method Name: train