* Move Firestore to Auth interop library.
* Fixed TODO with no name.
* Extract interop into separate class.
* Further Firestore interop changes.
* Move auth instance to constructor of CredentialsProvider.
* Resolved travis failures.
* Create separate queue for FIRApp instances, remove dead test code.
* Add missing <string> import.
Also "fixed" BadFieldValueTagWithOtherValidTagsPresent test by changing
'false' to 'true'. Details: Depending on the version of nanopb, nanopb
would explicitly encode 'false', which shouldn't be done in proto3. When
it's explicitly encoded, the test worked properly. But when it was
(properly) dropped, the invalid tag is the only field that's actually
encoded, thus violating the assumptions of the test, leading to a test
failure. s/false/true fixes it, as now the boolean_value field is
(properly) encoded regardless of version.
This involves:
- building c++ libprotobuf (rather than just the obj-c version).
- adding c++ libprotobuf, c++ built protos (previously created) to the
*test suite* only (not to the main build).
- modifying existing nanopb CFLAGS to match those that are indirectly
pulled in.
* Version bumps for Firebase 4.10.1 (#891)
* Minimal fix for b/74357976 (#890)
Fixes b/74357976 which caused unauthenticated users to be unable to reach the Firestore backend and updates the changelog.
* Copy all C++ strings to NSString where they're not obviously safe (#893)
This fixes a known instances of memory corruption where in
FSTLevelDBMutationQueue, the NSString view was retained for later, and
the incorrect user was used, causing b/74381054.
gRPC does not necessarily copy its string argumnets and if our hostname
were configured to a non-default one it's possible that we could corrupt
the host cache too.
All remaining usages of util::WrapNSStringNoCopy are obviously safe:
passed into logging or other known transient usages.
* fix lint
absl includes code like this:
```
void fn(std::initializer_list<absl::string_view> pieces) {
...
for (const absl::string_view piece : pieces) total_size += piece.size();
```
clang objects, suggesting that a reference should be used instead, i.e.:
```
for (const absl::string_view& piece : pieces) total_size += piece.size();
```
But:
a) we don't want to touch absl code
b) string_views are cheap to copy (and absl recommends copying
string_views rather than taking references as it may result in smaller
code)
c) some brief, naive benchmarking suggests there's no significant
different in this case (i.e. (b) is correct.)
Note that -Wrange-loop-analysis is already exlicitly enabled in our
cmake build.
In order to use different cflags for abseil, this patch splits it out
into a subspec within the pod.
The cmake side of things "just works" since Firestore/CMakeLists.txt
includes abseil before setting our compiler flags.
Involves adding PODS_ROOT/nanopb to include path (to allow include
<pb.h>) and Firestore/Protos/nanopb to include path (to allow include
"google/api/annotations.pb.h" and similar).
In both cases, this is to allow auto-generated code to function
properly.
* Add CMake platform detection logic for SecureRandom
Now only builds secure_random_arc4random.cc if available.
Remove firebase/firestore/base/port.h. Nothing else was in that
directory.
* Add a SecureRandom implementation that uses OpenSSL
This is usable on Linux, Windows, and Android
* Properly check return from RAND_bytes
* Move sources into firebase::firestore and internal namespaces
Combine support and core/util packages; this distinction wasn't really
paying its freight.