Overview
Comment: | OFIRI: Disallow a few Unicode characters |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
52344ad8bfc972068516776c73d99b70 |
User & Date: | js on 2022-11-24 01:15:21 |
Other Links: | manifest | tags |
Context
2022-11-25
| ||
20:41 | configure: Add classic macOS check-in: b25b83f1fc user: js tags: trunk | |
2022-11-24
| ||
01:15 | OFIRI: Disallow a few Unicode characters check-in: 52344ad8bf user: js tags: trunk | |
00:31 | OFDictionary: Remove leftover character set check-in: 02cad72155 user: js tags: trunk | |
Changes
Modified src/OFIRI.m from [24180b8108] to [f780c28ebe].
︙ | ︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 | hasColon = true; UTF8String++; } return hasColon; } static bool isUnicodePrivate(OFUnichar character) { if (character >= 0xE00 && character <= 0xF8FF) return true; if (character >= 0xF0000 && character <= 0xFFFFD) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 132 133 134 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 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | hasColon = true; UTF8String++; } return hasColon; } static bool isUnicode(OFUnichar character) { if (character >= 0xA0 && character <= 0xD7FF) return true; if (character >= 0xF900 && character <= 0xFDCF) return true; if (character >= 0xFDF0 && character <= 0xFFEF) return true; if (character >= 0x10000 && character <= 0x1FFFD) return true; if (character >= 0x20000 && character <= 0x2FFFD) return true; if (character >= 0x30000 && character <= 0x3FFFD) return true; if (character >= 0x40000 && character <= 0x4FFFD) return true; if (character >= 0x50000 && character <= 0x5FFFD) return true; if (character >= 0x60000 && character <= 0x6FFFD) return true; if (character >= 0x70000 && character <= 0x7FFFD) return true; if (character >= 0x80000 && character <= 0x8FFFD) return true; if (character >= 0x90000 && character <= 0x9FFFD) return true; if (character >= 0xA0000 && character <= 0xAFFFD) return true; if (character >= 0xB0000 && character <= 0xBFFFD) return true; if (character >= 0xC0000 && character <= 0xCFFFD) return true; if (character >= 0xD0000 && character <= 0xDFFFD) return true; if (character >= 0xE0000 && character <= 0xEFFFD) return true; return false; } static bool isUnicodePrivate(OFUnichar character) { if (character >= 0xE00 && character <= 0xF8FF) return true; if (character >= 0xF0000 && character <= 0xFFFFD) |
︙ | ︙ | |||
173 174 175 176 177 178 179 | @implementation OFIRIAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; | | | | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | @implementation OFIRIAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; if (isUnicode(character)) return true; switch (character) { case '-': case '.': case '_': case '~': case '!': |
︙ | ︙ | |||
222 223 224 225 226 227 228 | @implementation OFIRIPathAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; | | | | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | @implementation OFIRIPathAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; if (isUnicode(character)) return true; switch (character) { case '-': case '.': case '_': case '~': case '!': |
︙ | ︙ | |||
257 258 259 260 261 262 263 | @implementation OFIRIQueryAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; | | | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | @implementation OFIRIQueryAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; if (isUnicode(character) || isUnicodePrivate(character)) return true; switch (character) { case '-': case '.': case '_': case '~': |
︙ | ︙ | |||
293 294 295 296 297 298 299 | @implementation OFIRIQueryKeyValueAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; | | | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | @implementation OFIRIQueryKeyValueAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; if (isUnicode(character) || isUnicodePrivate(character)) return true; switch (character) { case '-': case '.': case '_': case '~': |
︙ | ︙ | |||
327 328 329 330 331 332 333 | @implementation OFIRIFragmentAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; | | | | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | @implementation OFIRIFragmentAllowedCharacterSet - (bool)characterIsMember: (OFUnichar)character { if (character < CHAR_MAX && OFASCIIIsAlnum(character)) return true; if (isUnicode(character)) return true; switch (character) { case '-': case '.': case '_': case '~': case '!': |
︙ | ︙ |