Commit 7ce81ec
authored
fix(stdlib): Gate url.full and http.query behind send_default_pii (#6666)
`url.full`, `url.query`, and `url.fragment` span attributes set by the
stdlib (httplib) integration are now gated behind `send_default_pii`,
consistent with the same fix already applied to the aiohttp and wsgi
integrations. These attributes can contain sensitive query parameters or
path fragments, so they should only be captured when the user has
explicitly opted in.
`http.fragment` on the legacy span data path is unconditionally omitted
since fragments are never sent to the server and carry no useful
diagnostic value regardless of PII setting.
Fixes #PY-2557
Fixes #66651 parent 2545570 commit 7ce81ec
3 files changed
Lines changed: 31 additions & 17 deletions
File tree
- sentry_sdk/integrations
- tests/integrations
- requests
- stdlib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | | - | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
206 | | - | |
| 210 | + | |
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
| |||
1136 | 1140 | | |
1137 | 1141 | | |
1138 | 1142 | | |
| 1143 | + | |
1139 | 1144 | | |
1140 | 1145 | | |
1141 | 1146 | | |
1142 | 1147 | | |
1143 | 1148 | | |
1144 | 1149 | | |
| 1150 | + | |
1145 | 1151 | | |
1146 | 1152 | | |
1147 | 1153 | | |
| 1154 | + | |
1148 | 1155 | | |
1149 | 1156 | | |
1150 | 1157 | | |
| |||
1154 | 1161 | | |
1155 | 1162 | | |
1156 | 1163 | | |
1157 | | - | |
| 1164 | + | |
1158 | 1165 | | |
1159 | 1166 | | |
1160 | 1167 | | |
| |||
1167 | 1174 | | |
1168 | 1175 | | |
1169 | 1176 | | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | 1177 | | |
1175 | 1178 | | |
1176 | 1179 | | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1177 | 1190 | | |
1178 | 1191 | | |
1179 | 1192 | | |
1180 | 1193 | | |
1181 | 1194 | | |
1182 | 1195 | | |
1183 | | - | |
| 1196 | + | |
1184 | 1197 | | |
1185 | 1198 | | |
1186 | 1199 | | |
1187 | 1200 | | |
1188 | 1201 | | |
1189 | 1202 | | |
1190 | 1203 | | |
1191 | | - | |
1192 | 1204 | | |
1193 | 1205 | | |
1194 | 1206 | | |
| 1207 | + | |
| 1208 | + | |
1195 | 1209 | | |
1196 | 1210 | | |
1197 | 1211 | | |
| |||
0 commit comments