Repository navigation
reject path separators in fileExtensionForResponse - #16387
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
This commit is the result of the following commands: flutter pub get pod update --project-directory=ios/ pod update --project-directory=macos/ plus capping the firebase_core and firebase_messaging constraints in pubspec.yaml. Changelogs: https://pub.dev/packages/firebase_core/changelog#4130 https://pub.dev/packages/firebase_messaging/changelog#1643 Hold firebase_messaging below 16.5.0, where the plugin's launch-time APNs registration became conditional on an auto-init setting that is off while we configure Firebase from Dart, so getAPNSToken returns null and we never register the device: firebase/flutterfire#18452 Cap firebase_core too, to hold the rest of the family back with it: firebase_messaging_platform_interface 4.10.0, firebase_messaging_web 4.2.5 and _flutterfire_internals 1.3.77 each require firebase_core ^4.14.0. These also bump the Firebase Android BoM (34.15.0 to 34.17.0) and the Firebase iOS SDK (12.15.0 to 12.17.0): https://firebase.google.com/support/release-notes/android https://firebase.google.com/support/release-notes/ios The Android SDK's FCM component now better handles a re-registration error: firebase/firebase-android-sdk#8507 For the iOS SDK's FCM component: 12.16.0 adds the new FCM registration API, which we do not use, we take only the APNs token from Firebase API. firebase/firebase-ios-sdk#16133 12.17.0 rejects path separators in file extensions of downloaded image attachments, in Firebase's notification service extension, which we do not use, we have implement our own notification service extension. firebase/firebase-ios-sdk#16387
Server-controlled MIME type reaches the image download path
The push payload chooses the image URL, so the responding server controls the
Content-TypethatfileExtensionForResponse:turns into the downloaded file's extension, and it gets appended to the temp path withstringByAppendingString:. A value likeimage/../../../../evilbecomes a suffix carrying path separators that relocates the saved attachment outside its temp file, so I reject any MIME-derived extension that contains a separator. Added a test that stubs the response the same way the existing extension tests do.