mirror of
https://github.com/github/codeql.git
synced 2025-12-19 10:23:15 +01:00
The output from running the test script is: ``` 'rootdir/bar' [13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2 'rootdir/bar' [13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2 'rootdir/foo%2fbar' [13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2 'rootdir/%2e%2e%2fbar' [13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2 'rootdir/foo%c0%afbar' [13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2 ``` I didn't add a `.py` extension, so it wasn't extracted, since we don't actually care about what we model in that file.
11 lines
267 B
Python
11 lines
267 B
Python
import os.path
|
|
|
|
from django.db import models
|
|
|
|
def custom_path_function(instance, filename):
|
|
print(repr(os.path.join("rootdir", filename)))
|
|
raise NotImplementedError()
|
|
|
|
class MyModel(models.Model):
|
|
upload = models.FileField(upload_to=custom_path_function)
|