(self, inner_path)
| 353 | |
| 354 | # Security check and return path of site's file |
| 355 | def getPath(self, inner_path): |
| 356 | inner_path = inner_path.replace("\\", "/") # Windows separator fix |
| 357 | if not inner_path: |
| 358 | return self.directory |
| 359 | |
| 360 | if "../" in inner_path: |
| 361 | raise Exception("File not allowed: %s" % inner_path) |
| 362 | |
| 363 | return "%s/%s" % (self.directory, inner_path) |
| 364 | |
| 365 | # Get site dir relative path |
| 366 | def getInnerPath(self, path): |
no outgoing calls
no test coverage detected