Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote wipe. #1504

Merged
merged 2 commits into from
Oct 17, 2019
Merged

Remote wipe. #1504

merged 2 commits into from
Oct 17, 2019

Conversation

camilasan
Copy link
Member

@camilasan camilasan commented Oct 12, 2019

  • amend git comment
  • more testing
  • test on Windows

@misch7
Copy link
Member

misch7 commented Oct 12, 2019

Cool, I want to see this in action :-)

Drone build failed, seems like the implementations of the removeAccountFolders methods are missing in:

  • src/gui/accountsettings.cpp
  • src/gui/accountmanager.cpp

But Drone did not fail for Debian and AppImage (the latter one failed because of an upload error).

Perhaps just a problem in test compilation?

[ 70%] Linking CXX executable ../bin/FolderManTest
CMakeFiles/FolderManTest.dir/__/src/gui/folderman.cpp.o: In function OCC::FolderMan::FolderMan(QObject*):
/drone/src/src/gui/folderman.cpp:79: undefined reference to OCC::AccountManager::removeAccountFolders(OCC::AccountState*)
CMakeFiles/FolderManTest.dir/__/src/gui/accountstate.cpp.o: In function OCC::AccountState::slotInvalidCredentials():
/drone/src/src/gui/accountstate.cpp:340: undefined reference to OCC::RemoteWipe::RemoteWipe(QSharedPointer<OCC::Account>, QObject*)
/drone/src/src/gui/accountstate.cpp:342: undefined reference to OCC::RemoteWipe::startCheckJobWithAppPassword(QString)
collect2: error: ld returned 1 exit status
make[2]: *** [bin/FolderManTest] Error 1
test/CMakeFiles/FolderManTest.dir/build.make:479: recipe for target 'bin/FolderManTest' failed
make[1]: *** [test/CMakeFiles/FolderManTest.dir/all] Error 2
CMakeFiles/Makefile2:1704: recipe for target 'test/CMakeFiles/FolderManTest.dir/all' failed
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

And it doesn't find OCC::RemoteWipe::RemoteWipe even though remotewipe.cpp is
in src/gui/CMakeLists.txt

@camilasan
Copy link
Member Author

Drone build failed, seems like the implementations of the removeAccountFolders methods are missing in:

* src/gui/accountsettings.cpp

* src/gui/accountmanager.cpp

They are signals.

@camilasan camilasan force-pushed the feature/remote-wipe branch 3 times, most recently from 106517e to 67997f0 Compare October 17, 2019 12:33
@camilasan camilasan requested a review from misch7 October 17, 2019 12:38
…quested.

- When the the users logs because of 401 or 403 errors, it checks if the
server requested the remote wipe. If yes, locally deletes account and folders
connected to the account and notify the server. If no, proceeds to ask the
user to login again.
- The app password is restored in the keychain.
- WIP: The change also includes a test class for RemoteWipe.

Signed-off-by: Camila San <hello@camila.codes>
Copy link
Member

@misch7 misch7 left a comment

Choose a reason for hiding this comment

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

Approving for RC1 :)

Looks good so far and works well with HTTP connections.

TODO: Still not working with SSL connections (tested on Mac and Windows).

Fixed by PR #1579

@misch7 misch7 merged commit 5775ec1 into master Oct 17, 2019
@misch7 misch7 deleted the feature/remote-wipe branch October 17, 2019 20:23
@camilasan
Copy link
Member Author

/backport to stable-2.6

@backportbot-nextcloud
Copy link

The backport to stable-2.6 failed. Please do this backport manually.

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

Successfully merging this pull request may close these issues.

2 participants