Commit 2824502
fix: add URL validation to prevent SSRF attacks in tts-outetts.py
- Added is_safe_url() function to validate URLs before HTTP requests
- Blocks localhost and private IP ranges
- Only allows http:// and https:// protocols
- Validates command-line URL arguments before use
Addresses 2 SSRF vulnerabilities (CWE-918)
Co-Authored-By: Jake Cosme <[email protected]>1 parent bf4b8cf commit 2824502
1 file changed
+36
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
136 | 164 | | |
137 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
138 | 174 | | |
139 | 175 | | |
140 | 176 | | |
| |||
0 commit comments