Skip to content

Add FingerPrint DB#8098

Merged
nbolton merged 1 commit intodeskflow:masterfrom
varshith257:fix/client-identity-verification
Jan 28, 2025
Merged

Add FingerPrint DB#8098
nbolton merged 1 commit intodeskflow:masterfrom
varshith257:fix/client-identity-verification

Conversation

@varshith257
Copy link
Copy Markdown
Contributor

@varshith257 varshith257 commented Jan 15, 2025

Part of #7806

Blocks: #7931

@sithlord48

This comment was marked as resolved.

@varshith257

This comment was marked as resolved.

@sithlord48

This comment was marked as resolved.

@nbolton nbolton marked this pull request as draft January 16, 2025 12:48
@nbolton

This comment was marked as resolved.

@nbolton

This comment was marked as resolved.

@sithlord48

This comment was marked as resolved.

@varshith257
Copy link
Copy Markdown
Contributor Author

@nbolton There are many ways to award the bounty.
/claim in the PR description will automate without any hustle.

And another way is /tip $X @contributor depends on our convience

@sithlord48
Copy link
Copy Markdown
Member

please do not fix commits with more commits

@varshith257
Copy link
Copy Markdown
Contributor Author

@sithlord48 Just I will squash the commits at last :)

@varshith257
Copy link
Copy Markdown
Contributor Author

varshith257 commented Jan 16, 2025

@nbolton @sithlord48 Sorry for the noise here as my storage space in my PC is mostly full and I can't build it locally and push it here so I am testing it here.

@varshith257
Copy link
Copy Markdown
Contributor Author

@sithlord48 I hope your guidance makes more sense here. There is field data in FingerprintData struct but build failing can't access it

@varshith257
Copy link
Copy Markdown
Contributor Author

@sithlord48 The error occurring due to OpenSSL dependency

@sithlord48
Copy link
Copy Markdown
Member

i do remember having to deal with this i think in input-leap.

@sithlord48
Copy link
Copy Markdown
Member

have not had time to look at the code buty
deskflow::format_ssl_fingerprint[abi:cxx11](std::vector<unsigned char, std::allocator<unsigned char> > const&, bool)
stands out to me iirc that function takes a (std::vector<uint8_t , bool) is the input proper ?

@sithlord48
Copy link
Copy Markdown
Member

Looking over the code just a note , please use #pragma once instead of #if / #ifdef #endif

@varshith257
Copy link
Copy Markdown
Contributor Author

@sithlord48 Is this due to import issues?

@varshith257
Copy link
Copy Markdown
Contributor Author

@sithlord48 One error left of build failed of not getting compiled of Arch.h which isn't affected with any changes here

@sithlord48
Copy link
Copy Markdown
Member

I've just noticed that there are some issues with the Common library in this PR . it can't be an INTERFACE if it has cpp files taht need building.
that could be part of your issue.

@sithlord48 sithlord48 added this to the v2.0.0 milestone Jan 20, 2025
@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 23, 2025

@varshith257 Need any help from us to get this PR landed?

@varshith257
Copy link
Copy Markdown
Contributor Author

varshith257 commented Jan 23, 2025

@nbolton Mostly it is done and a fix is needed of not getting compiled of Arch.h which isn't affected with any changes here

@varshith257
Copy link
Copy Markdown
Contributor Author

@nbolton All workflows are passing. I think its ready to merge

@nbolton nbolton self-requested a review January 23, 2025 17:43
@deskflow deskflow deleted a comment from varshith257 Jan 26, 2025
@deskflow deskflow deleted a comment from varshith257 Jan 26, 2025
@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 27, 2025

/tip $200 @sithlord48

@algora-pbc
Copy link
Copy Markdown

algora-pbc bot commented Jan 27, 2025

@sithlord48: You just got a $200 tip! 👉 Complete your Algora onboarding to collect your payment.

@algora-pbc
Copy link
Copy Markdown

algora-pbc bot commented Jan 27, 2025

🎉🎈 @sithlord48 has been awarded $200! 🎈🎊

@varshith257
Copy link
Copy Markdown
Contributor Author

@sithlord48 @nbolton Do we need any changes here or can be merged?

@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 28, 2025

@sithlord48 @nbolton Do we need any changes here or can be merged?

Testing now, thanks for your patience.

Copy link
Copy Markdown
Member

@nbolton nbolton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My earlier request about using camelCase instead of snake_case appears to have not been actioned. Please fix this. We do not use snake_case.

Please read the code style.

@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 28, 2025

@varshith257 This kind of error tells me that you are not testing your changes locally, which breaks the rules of our hacking guide: 3. Open PRs must be tested and must compile

Please do not use our CI as your compiler, as this wastes time for maintainers. Test your changes locally before pushing.

FAILED: src/lib/net/CMakeFiles/net.dir/FingerprintDatabase.cpp.o 
/usr/sbin/c++ -DHAVE_CONFIG_H -DHAVE_GDK_PIXBUF=1 -DHAVE_LIBNOTIFY=1 -DNDEBUG -DSYSAPI_UNIX=1 -DWINAPI_XWINDOWS=1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/__w/deskflow/deskflow/src/./lib -I/__w/deskflow/deskflow/build/src/lib -fPIC -O3 -DNDEBUG -std=c++20 -Werror -MD -MT src/lib/net/CMakeFiles/net.dir/FingerprintDatabase.cpp.o -MF src/lib/net/CMakeFiles/net.dir/FingerprintDatabase.cpp.o.d -o src/lib/net/CMakeFiles/net.dir/FingerprintDatabase.cpp.o -c /__w/deskflow/deskflow/src/lib/net/FingerprintDatabase.cpp
/__w/deskflow/deskflow/src/lib/net/FingerprintDatabase.cpp: In member function ‘void deskflow::FingerprintDatabase::read(const std::filesystem::__cxx11::path&)’:
/__w/deskflow/deskflow/src/lib/net/FingerprintDatabase.cpp:18:3: error: ‘open_utf8_path’ was not declared in this scope; did you mean ‘openUtf8Path’?
   18 |   open_utf8_path(file, path, std::ios_base::in);
      |   ^~~~~~~~~~~~~~
      |   openUtf8Path
/__w/deskflow/deskflow/src/lib/net/FingerprintDatabase.cpp: In member function ‘void deskflow::FingerprintDatabase::write(const std::filesystem::__cxx11::path&)’:
/__w/deskflow/deskflow/src/lib/net/FingerprintDatabase.cpp:25:3: error: ‘open_utf8_path’ was not declared in this scope; did you mean ‘openUtf8Path’?
   25 |   open_utf8_path(file, path, std::ios_base::out);
      |   ^~~~~~~~~~~~~~
      |   openUtf8Path

It does not compile on any OS.

image

@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 28, 2025

@varshith257 Heads up, I'm going to force push some changes to your branch.

@nbolton nbolton force-pushed the fix/client-identity-verification branch from 3e5d5a2 to 90842f3 Compare January 28, 2025 18:34
@nbolton nbolton changed the title Fix(CVE-2021-42072, CVE-2021-42073) : Add FingerPrint DB Add FingerPrint DB Jan 28, 2025
@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 28, 2025

I changed the title as I can't see how this fixes any CVEs.

@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 28, 2025

I removed the bounty claim as the issue is nowhere near fixed by this PR.

@nbolton nbolton force-pushed the fix/client-identity-verification branch from 90842f3 to 9afc1bf Compare January 28, 2025 18:39
@nbolton nbolton force-pushed the fix/client-identity-verification branch from 9afc1bf to 59dc22b Compare January 28, 2025 18:40
Copy link
Copy Markdown
Member

@nbolton nbolton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will approve this to land only because @sithlord48 said it's blocking his PR: #7931

To that effect, I have added this comment to all files which are dead code until they are used:

// TODO: remove dead code if not used in PR #7931

I had to make significant changes to this PR, as it broke many code style rules.

@nbolton nbolton enabled auto-merge (rebase) January 28, 2025 18:42
@nbolton nbolton requested a review from sithlord48 January 28, 2025 18:42
@varshith257
Copy link
Copy Markdown
Contributor Author

@nbolton Me and @sithlord48 aggreed upon I will work on supporting FingerPrintDataBase and @sithlord48 had already worked fixing this CVE of adding peer identity before the bounty enabled and we agreed upon the same of using fingerprintdatabse and I landed this PR

Copy link
Copy Markdown
Member

@sithlord48 sithlord48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good if it builds and passes

@nbolton nbolton merged commit 8f219b7 into deskflow:master Jan 28, 2025
@nbolton
Copy link
Copy Markdown
Member

nbolton commented Jan 29, 2025

This PR was reverted: #8149

Landing it in the first place was a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants