Merge branch '1.5'

Conflicts:
	VERSION.cmake
	src/mirall/owncloudpropagator.cpp
	src/mirall/owncloudpropagator.h
This commit is contained in:
Olivier Goffart 2014-02-27 11:40:34 +01:00
commit 869793592d
72 changed files with 1073 additions and 177 deletions

View File

@ -1,6 +1,28 @@
ChangeLog
=========
version 1.5.2 (release 2014-02-26 )
* Fix behavior when attempting to rename Shared folder
* Fix potential endless sync loops on Mac OS (#1463)
* Fix potential crash when pausing during update phase (#1442)
* Fix handing of shared directories
* Fix online state handling (#1441, #1459)
* Fix potential crash in c_iconv on Mac OS
* Fix certificate chain display in SSLButton
* Fix sporadicly appearing multiple auth prompts on sign-in
* Show correct state icon in Account Settings right away
* Re-fetch content that gets deleted from read only shared directories
* Do not store the password in the config file, erase existing ones (#1469)
* Shibboleth: Close browser window after login
* Shibboleth: Proper invalidation if timeout during sync
* Shibboleth: Do not pop up IdP login immediately when modifying account
* Shibboleth: Avoid auth on restart by storing cookies in the wallet
* Fix license headers
ChangeLog
=========
version 1.5.1 (release 2014-02-13 )
* Added an auto updater that updates the client if a
more recent version was found automatically (Windows, Mac OS X)

View File

@ -612,9 +612,8 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
ctx->status_code = CSYNC_STATUS_UPDATE_ERROR;
}
csync_vio_closedir(ctx, dh);
ctx->current_fs = previous_fs;
goto done;
goto error;
}
if (flag == CSYNC_FTW_FLAG_DIR && depth
@ -622,8 +621,7 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
rc = csync_ftw(ctx, filename, fn, depth - 1);
if (rc < 0) {
ctx->current_fs = previous_fs;
csync_vio_closedir(ctx, dh);
goto done;
goto error;
}
if (ctx->current_fs && !ctx->current_fs->child_modified
@ -650,15 +648,14 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, " <= Closing walk for %s with read_from_db %d", uri, read_from_db);
done:
ctx->remote.read_from_db = read_from_db;
csync_vio_file_stat_destroy(dirent);
SAFE_FREE(filename);
return rc;
error:
ctx->remote.read_from_db = read_from_db;
if (dh != NULL) {
csync_vio_closedir(ctx, dh);
}
ctx->remote.read_from_db = read_from_db;
SAFE_FREE(filename);
return -1;
}

View File

@ -1,3 +1,23 @@
/*
* httpbf - send big files via http
*
* Copyright (c) 2012 Klaas Freitag <freitag@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <stdio.h>

View File

@ -126,7 +126,7 @@ static char *c_iconv(const char* str, enum iconv_direction dir)
}
if (ret == (size_t)-1) {
SAFE_FREE(out);
SAFE_FREE(out_in);
return NULL;
}

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config_csync.h"
#include "torture.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "torture.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config_csync.h"
#include <string.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "torture.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "torture.h"
#include "csync_misc.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include <unistd.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "torture.h"
#define CSYNC_TEST 1

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "torture.h"
#include "csync_time.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "torture.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "torture.h"
#include "csync_update.c"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "torture.h"
#include "csync_util.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2013 by Klaas Freitag <freitag@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "torture.h"
#include "c_string.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2013 by Klaas Freitag <freitag@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
#include <sys/types.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "support.h"

View File

@ -6,6 +6,20 @@
#
# Copyright (C) by Klaas Freitag <freitag@owncloud.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
use lib ".";

View File

@ -6,6 +6,20 @@
#
# Copyright (C) by Klaas Freitag <freitag@owncloud.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
use lib ".";

View File

@ -6,6 +6,20 @@
#
# Copyright (C) by Olivier Goffart <ogoffart@woboq.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
use lib ".";

View File

@ -6,6 +6,20 @@
#
# Copyright (C) by Olivier Goffart <ogoffart@woboq.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
use lib ".";

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "torture.h"
#include "std/c_alloc.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdlib.h>
#include <time.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <errno.h>
#include <time.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <errno.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include <unistd.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config_csync.h"
#include "torture.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _TORTURE_H
#define _TORTURE_H

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "torture.h"
#include "vio/csync_vio_file_stat.h"

View File

@ -1,3 +1,22 @@
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdlib.h>
#include "torture.h"

View File

@ -1,4 +1,17 @@
#!/bin/sh
#
# Copyright (C) by Daniel Molkentin <danimo@owncloud.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
WINEPREFIX=${WINEPREFIX:=$HOME/.wine}

View File

@ -262,6 +262,7 @@ set(mirall_SRCS
wizard/owncloudwizard.cpp
wizard/owncloudsetuppage.cpp
wizard/owncloudhttpcredspage.cpp
wizard/abstractcredswizardpage.cpp
wizard/owncloudwizardresultpage.cpp
wizard/owncloudwizardcommon.cpp
wizard/owncloudshibbolethcredspage.cpp
@ -287,6 +288,7 @@ set(mirall_HEADERS
wizard/owncloudwizard.h
wizard/owncloudsetuppage.h
wizard/owncloudhttpcredspage.h
wizard/abstractcredswizardpage.h
wizard/owncloudwizardresultpage.h
wizard/owncloudwizardcommon.h
wizard/owncloudshibbolethcredspage.h

View File

@ -42,6 +42,10 @@ public:
virtual void persist(Account *account) = 0;
/** Invalidates auth token, or password for basic auth */
virtual void invalidateToken(Account *account) = 0;
virtual void invalidateAndFetch(Account *account) {
invalidateToken(account);
fetch(account);
}
static QString keychainKey(const QString &url, const QString &user);

View File

@ -100,7 +100,8 @@ HttpCredentials::HttpCredentials()
HttpCredentials::HttpCredentials(const QString& user, const QString& password)
: _user(user),
_password(password),
_ready(true)
_ready(true),
_fetchJobInProgress(false)
{
}
@ -179,19 +180,39 @@ QString HttpCredentials::fetchUser(Account* account)
void HttpCredentials::fetch(Account *account)
{
if( !account ) {
return;
}
if (_fetchJobInProgress) {
return;
}
fetchUser(account);
QSettings *settings = account->settingsWithGroup(Theme::instance()->appName());
QString kck = keychainKey(account->url().toString(), _user );
QString key = QString::fromLatin1( "%1/data" ).arg( kck );
if( settings && settings->contains(key) ) {
// Clean the password from the config file if it is in there.
// we do not want a security problem.
settings->remove(key);
key = QString::fromLatin1( "%1/type" ).arg( kck );
settings->remove(kck);
settings->sync();
}
if (_ready) {
Q_EMIT fetched();
} else {
ReadPasswordJob *job = new ReadPasswordJob(Theme::instance()->appName());
if( ! account->property("fetch_from_old_place").isValid() ) {
job->setSettings(account->settingsWithGroup(Theme::instance()->appName()));
}
job->setInsecureFallback(true);
job->setInsecureFallback(false);
job->setKey(keychainKey(account->url().toString(), _user));
connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotReadJobDone(QKeychain::Job*)));
job->setProperty("account", QVariant::fromValue(account));
job->start();
_fetchJobInProgress = true;
}
}
bool HttpCredentials::stillValid(QNetworkReply *reply)
@ -208,32 +229,32 @@ void HttpCredentials::slotReadJobDone(QKeychain::Job *job)
_password = readJob->textData();
Account *account = qvariant_cast<Account*>(readJob->property("account"));
QKeychain::Error error = job->error();
switch (error) {
case NoError:
_ready = true;
account->setProperty("fetch_from_old_place", QVariant());
Q_EMIT fetched();
break;
default:
if (!_user.isEmpty()) {
bool ok;
// In case we haven't tried at the old place yet, do!
if( !account->property("fetch_from_old_place").isValid() ) {
account->setProperty("fetch_from_old_place", QVariant(true) );
if( _user.isEmpty()) {
qDebug() << "Strange: User is empty!";
}
fetch(account);
return;
}
QString pwd = queryPassword(&ok);
if (ok) {
_password = pwd;
_ready = true;
persist(account);
}
emit fetched();
QKeychain::Error error = job->error();
if( !_password.isEmpty() && error == NoError ) {
// All cool, the keychain did not come back with error.
// Still, the password can be empty which indicates a problem and
// the password dialog has to be opened.
_ready = true;
_fetchJobInProgress = false;
emit fetched();
} else {
if( error != NoError ) {
qDebug() << "Error while reading password" << job->errorString();
}
qDebug() << "Error while reading password" << job->errorString();
bool ok;
QString pwd = queryPassword(&ok);
_fetchJobInProgress = false;
if (ok) {
_password = pwd;
_ready = true;
persist(account);
}
emit fetched();
}
}
@ -268,8 +289,7 @@ void HttpCredentials::persist(Account *account)
{
account->setCredentialSetting(QLatin1String(userC), _user);
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());
job->setSettings(account->settingsWithGroup(Theme::instance()->appName()));
job->setInsecureFallback(true);
job->setInsecureFallback(false);
connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotWriteJobDone(QKeychain::Job*)));
job->setKey(keychainKey(account->url().toString(), _user));
job->setTextData(_password);

View File

@ -62,6 +62,7 @@ private:
QString _user;
QString _password;
bool _ready;
bool _fetchJobInProgress; //True if the keychain job is in progress or the input dialog visible
};
} // ns Mirall

View File

@ -31,14 +31,13 @@ QNetworkReply* ShibbolethAccessManager::createRequest(QNetworkAccessManager::Ope
QNetworkCookieJar* jar(cookieJar());
QUrl url(request.url());
QList<QNetworkCookie> cookies;
Q_FOREACH(const QNetworkCookie& cookie, jar->cookiesForUrl(url)) {
if (!cookie.name().startsWith("_shibsession_")) {
cookies << cookie;
}
}
cookies << _cookie;
cookies << _cookie; // this line and the line above replace all cookies with self and then add the shibboleth cookie (filtering the current shib cookie)
jar->setCookiesFromUrl(cookies, url);
}

View File

@ -14,6 +14,7 @@
#include <QMutex>
#include <QSettings>
#include <QNetworkReply>
#include "creds/shibbolethcredentials.h"
#include "creds/shibboleth/shibbolethaccessmanager.h"
@ -76,6 +77,7 @@ ShibbolethCredentials::ShibbolethCredentials()
_url(),
_shibCookie(),
_ready(false),
_stillValid(false),
_browser(0),
_otherCookies()
{}
@ -172,9 +174,22 @@ QNetworkAccessManager* ShibbolethCredentials::getQNAM() const
connect(this, SIGNAL(newCookie(QNetworkCookie)),
qnam, SLOT(setCookie(QNetworkCookie)));
connect(qnam, SIGNAL(finished(QNetworkReply*)),
this, SLOT(slotReplyFinished(QNetworkReply*)));
return qnam;
}
void ShibbolethCredentials::slotReplyFinished(QNetworkReply* r)
{
QVariant target = r->attribute(QNetworkRequest::RedirectionTargetAttribute);
if (target.isValid()) {
_stillValid = false;
qWarning() << Q_FUNC_INFO << "detected redirect, will open Login Window"; // will be done in NetworkJob's finished signal
} else {
//_stillValid = true; // gets set when reading from keychain or getting it from browser
}
}
bool ShibbolethCredentials::ready() const
{
return _ready;
@ -201,7 +216,7 @@ void ShibbolethCredentials::fetch(Account *account)
bool ShibbolethCredentials::stillValid(QNetworkReply *reply)
{
Q_UNUSED(reply)
return true;
return _stillValid;
}
void ShibbolethCredentials::persist(Account* account)
@ -213,17 +228,20 @@ void ShibbolethCredentials::persist(Account* account)
storeShibCookie(_shibCookie, account);
}
// only used by Application::slotLogout(). Use invalidateAndFetch for normal usage
void ShibbolethCredentials::invalidateToken(Account *account)
{
Q_UNUSED(account)
_shibCookie = QNetworkCookie();
storeShibCookie(_shibCookie, account);
storeShibCookie(_shibCookie, account); // store/erase cookie
// ### access to ctx missing, but might not be required at all
//csync_set_module_property(ctx, "session_key", "");
}
void ShibbolethCredentials::disposeBrowser()
{
qDebug() << Q_FUNC_INFO;
disconnect(_browser, SIGNAL(viewHidden()),
this, SLOT(slotBrowserHidden()));
disconnect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie, Account*)),
@ -237,6 +255,7 @@ void ShibbolethCredentials::onShibbolethCookieReceived(const QNetworkCookie& coo
{
disposeBrowser();
_ready = true;
_stillValid = true;
_shibCookie = cookie;
storeShibCookie(_shibCookie, account);
Q_EMIT newCookie(_shibCookie);
@ -254,6 +273,20 @@ void ShibbolethCredentials::slotBrowserHidden()
void ShibbolethCredentials::invalidateAndFetch(Account* account)
{
_ready = false;
// delete the credentials, then in the slot fetch them again (which will trigger browser)
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
job->setProperty("account", QVariant::fromValue(account));
job->setSettings(account->settingsWithGroup(Theme::instance()->appName()));
connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotInvalidateAndFetchInvalidateDone(QKeychain::Job*)));
job->setKey(keychainKey(account->url().toString(), "shibAssertion"));
job->start();
}
void ShibbolethCredentials::slotInvalidateAndFetchInvalidateDone(QKeychain::Job* job)
{
Account *account = qvariant_cast<Account*>(job->property("account"));
connect (this, SIGNAL(fetched()),
this, SLOT(onFetched()));
// small hack to support the ShibbolethRefresher hack
@ -276,6 +309,7 @@ void ShibbolethCredentials::slotReadJobDone(QKeychain::Job *job)
if (job->error() == QKeychain::NoError) {
ReadPasswordJob *readJob = static_cast<ReadPasswordJob*>(job);
delete readJob->settings();
qDebug() << Q_FUNC_INFO;
QList<QNetworkCookie> cookies = QNetworkCookie::parseCookies(readJob->textData().toUtf8());
if (cookies.count() > 0) {
_shibCookie = cookies.first();
@ -283,20 +317,34 @@ void ShibbolethCredentials::slotReadJobDone(QKeychain::Job *job)
job->setSettings(account->settingsWithGroup(Theme::instance()->appName()));
_ready = true;
_stillValid = true;
Q_EMIT newCookie(_shibCookie);
Q_EMIT fetched();
} else {
ShibbolethConfigFile cfg;
_browser = new ShibbolethWebView(account, cfg.createCookieJar());
connect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie, Account*)),
this, SLOT(onShibbolethCookieReceived(QNetworkCookie, Account*)));
connect(_browser, SIGNAL(viewHidden()),
this, SLOT(slotBrowserHidden()));
_browser->show();
showLoginWindow(account);
}
}
void ShibbolethCredentials::showLoginWindow(Account* account)
{
if (_browser) {
_browser->activateWindow();
_browser->raise();
// FIXME On OS X this does not raise properly
return;
}
ShibbolethConfigFile cfg;
_browser = new ShibbolethWebView(account, cfg.createCookieJar());
connect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie, Account*)),
this, SLOT(onShibbolethCookieReceived(QNetworkCookie, Account*)));
connect(_browser, SIGNAL(viewHidden()),
this, SLOT(slotBrowserHidden()));
// FIXME If the browser was hidden (e.g. user closed it) without us logging in, the logic gets stuck
// and can only be unstuck by restarting the app or pressing "Sign in" (we should switch to offline but we don't)
_browser->show();
}
void ShibbolethCredentials::storeShibCookie(const QNetworkCookie &cookie, Account *account)
{
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());

View File

@ -52,6 +52,8 @@ public:
QNetworkCookie cookie() const;
void showLoginWindow(Account*);
public Q_SLOTS:
void invalidateAndFetch(Account *account);
@ -60,6 +62,8 @@ private Q_SLOTS:
void slotBrowserHidden();
void onFetched();
void slotReadJobDone(QKeychain::Job*);
void slotInvalidateAndFetchInvalidateDone(QKeychain::Job*);
void slotReplyFinished(QNetworkReply*);
Q_SIGNALS:
void newCookie(const QNetworkCookie& cookie);
@ -73,6 +77,7 @@ private:
QNetworkCookie _shibCookie;
bool _ready;
bool _stillValid;
ShibbolethWebView* _browser;
QMap<QUrl, QList<QNetworkCookie> > _otherCookies;
};

View File

@ -15,6 +15,7 @@
#include "mirall/theme.h"
#include "mirall/networkjobs.h"
#include "mirall/mirallconfigfile.h"
#include "mirall/quotainfo.h"
#include "creds/abstractcredentials.h"
#include "creds/credentialsfactory.h"
@ -62,11 +63,13 @@ Account::Account(AbstractSslErrorHandler *sslErrorHandler, QObject *parent)
: QObject(parent)
, _url(Theme::instance()->overrideServerUrl())
, _sslErrorHandler(sslErrorHandler)
, _quotaInfo(new QuotaInfo(this))
, _am(0)
, _credentials(0)
, _treatSslErrorsAsFailure(false)
, _state(Account::Disconnected)
{
qRegisterMetaType<Account*>("Account*");
}
Account::~Account()
@ -156,11 +159,15 @@ AbstractCredentials *Account::credentials() const
void Account::setCredentials(AbstractCredentials *cred)
{
_credentials = cred;
// set active credential manager
if (_am) {
_am->deleteLater();
}
if (_credentials) {
credentials()->deleteLater();
}
_credentials = cred;
_am = _credentials->getQNAM();
connect(_am, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
SLOT(slotHandleErrors(QNetworkReply*,QList<QSslError>)));
@ -298,6 +305,11 @@ void Account::setState(int state)
}
}
QuotaInfo *Account::quotaInfo()
{
return _quotaInfo;
}
void Account::slotHandleErrors(QNetworkReply *reply , QList<QSslError> errors)
{
NetworkJobTimeoutPauser pauser(reply);

View File

@ -32,6 +32,7 @@ namespace Mirall {
class AbstractCredentials;
class Account;
class QuotaInfo;
class AccountManager : public QObject {
Q_OBJECT
@ -134,6 +135,8 @@ public:
int state() const;
void setState(int state);
QuotaInfo *quotaInfo();
signals:
void stateChanged(int state);
@ -146,6 +149,7 @@ private:
QList<QSslCertificate> _approvedCerts;
QSslConfiguration _sslConfiguration;
QScopedPointer<AbstractSslErrorHandler> _sslErrorHandler;
QuotaInfo *_quotaInfo;
QNetworkAccessManager *_am;
AbstractCredentials* _credentials;
bool _treatSslErrorsAsFailure;

View File

@ -25,6 +25,7 @@
#include "mirall/mirallconfigfile.h"
#include "mirall/ignorelisteditor.h"
#include "mirall/account.h"
#include "mirall/quotainfo.h"
#include "creds/abstractcredentials.h"
#include <math.h>
@ -106,6 +107,11 @@ AccountSettings::AccountSettings(QWidget *parent) :
slotAccountStateChanged(_account->state());
}
QuotaInfo *quotaInfo = _account->quotaInfo();
connect( quotaInfo, SIGNAL(quotaUpdated(qint64,qint64)),
this, SLOT(slotUpdateQuota(qint64,qint64)));
slotUpdateQuota(quotaInfo->lastQuotaTotalBytes(), quotaInfo->lastQuotaUsedBytes());
setFolderList(FolderMan::instance()->map());
}
@ -133,6 +139,7 @@ void AccountSettings::slotFolderActivated( const QModelIndex& indx )
} else {
ui->_buttonEnable->setText( tr( "Resume" ) );
}
ui->_buttonEnable->setEnabled(_account && _account->state() == Account::Connected);
}
}
@ -758,7 +765,7 @@ void AccountSettings::slotAccountStateChanged(int state)
/*, tr("Version: %1 (%2)").arg(versionStr).arg(version) */ );
}
} else {
showConnectionLabel( tr("No connection to %1 at <a href=\"%1\">%2</a>.")
showConnectionLabel( tr("No connection to %1 at <a href=\"%2\">%3</a>.")
.arg(Theme::instance()->appNameGUI(),
_account->url().toString(),
safeUrl.toString()) );

View File

@ -135,7 +135,7 @@ Application::Application(int &argc, char **argv) :
}
if (account) {
connect(account, SIGNAL(stateChanged(int)), _gui, SLOT(slotAccountStateChanged()));
slotAccountChanged(account);
}
connect(AccountManager::instance(), SIGNAL(accountChanged(Account*,Account*)),
this, SLOT(slotAccountChanged(Account*,Account*)));
@ -189,8 +189,16 @@ void Application::slotLogout()
void Application::slotAccountChanged(Account *newAccount, Account *oldAccount)
{
disconnect(oldAccount, SIGNAL(stateChanged(int)), _gui, SLOT(slotAccountStateChanged()));
if (oldAccount) {
disconnect(oldAccount, SIGNAL(stateChanged(int)), _gui, SLOT(slotAccountStateChanged()));
disconnect(oldAccount, SIGNAL(stateChanged(int)), this, SLOT(slotToggleFolderman(int)));
connect(oldAccount->quotaInfo(), SIGNAL(quotaUpdated(qint64,qint64)),
_gui, SLOT(slotRefreshQuotaDisplay(qint64,qint64)));
}
connect(newAccount, SIGNAL(stateChanged(int)), _gui, SLOT(slotAccountStateChanged()));
connect(newAccount, SIGNAL(stateChanged(int)), this, SLOT(slotToggleFolderman(int)));
connect(newAccount->quotaInfo(), SIGNAL(quotaUpdated(qint64,qint64)),
_gui, SLOT(slotRefreshQuotaDisplay(qint64,qint64)));
}
@ -262,6 +270,24 @@ void Application::slotCredentialsFetched()
_conValidator->checkConnection();
}
void Application::slotToggleFolderman(int state)
{
FolderMan* folderMan = FolderMan::instance();
switch (state) {
case Account::Connected:
folderMan->setSyncEnabled(true);
folderMan->slotScheduleAllFolders();
break;
case Account::Disconnected:
case Account::SignedOut:
case Account::InvalidCredidential:
folderMan->setSyncEnabled(false);
folderMan->terminateSyncProcess();
break;
}
}
void Application::slotConnectionValidatorResult(ConnectionValidator::Status status)
{
qDebug() << "Connection Validator Result: " << _conValidator->statusString(status);

View File

@ -76,8 +76,9 @@ protected slots:
void slotLogin();
void slotLogout();
void slotCleanup();
void slotAccountChanged(Account *newAccount, Account *oldAccount);
void slotAccountChanged(Account *newAccount, Account *oldAccount = 0);
void slotCredentialsFetched();
void slotToggleFolderman(int state);
private:
void setHelp();

View File

@ -286,7 +286,10 @@ void Folder::etagRetreived(const QString& etag)
void Folder::slotNetworkUnavailable()
{
AccountManager::instance()->account()->setState(Account::Disconnected);
Account *account = AccountManager::instance()->account();
if (account && account->state() == Account::Connected) {
account->setState(Account::Disconnected);
}
_syncResult.setStatus(SyncResult::Unavailable);
emit syncStateChange();
}

View File

@ -402,7 +402,6 @@ QVariant MirallConfigFile::getValue(const QString& param, const QString& group,
const QVariant& defaultValue) const
{
QVariant systemSetting;
qDebug() << Q_FUNC_INFO;
if (Utility::isMac()) {
QSettings systemSettings(QLatin1String("/Library/Preferences/" APPLICATION_REV_DOMAIN ".plist"), QSettings::NativeFormat);
if (!group.isEmpty()) {

View File

@ -34,6 +34,7 @@
#include "creds/credentialsfactory.h"
#include "creds/abstractcredentials.h"
#include "creds/shibbolethcredentials.h"
Q_DECLARE_METATYPE(QTimer*)
@ -144,15 +145,13 @@ void AbstractNetworkJob::slotFinished()
AbstractCredentials *creds = _account->credentials();
if (!creds->stillValid(_reply) &&! _ignoreCredentialFailure
&& _account->state() != Account::InvalidCredidential) {
// invalidate & forget token/password
_account->credentials()->invalidateToken(_account);
_account->setState(Account::InvalidCredidential);
// invalidate & forget token/password
// but try to re-sign in.
connect( creds, SIGNAL(fetched()),
qApp, SLOT(slotCredentialsFetched()), Qt::UniqueConnection);
creds->fetch(_account); // this triggers Application::runValidator when the credidentials are fetched
creds->invalidateAndFetch(_account); // this triggers Application::runValidator when the credidentials are fetched
}
deleteLater();
}
@ -458,7 +457,8 @@ void PropfindJob::finished()
}
emit result(items);
} else {
qDebug() << "Quota request *not* successful, http result code is " << http_result_code;
qDebug() << "Quota request *not* successful, http result code is" << http_result_code
<< (http_result_code == 302 ? reply()->header(QNetworkRequest::LocationHeader).toString() : QLatin1String(""));
}
}

View File

@ -38,7 +38,6 @@ ownCloudGui::ownCloudGui(Application *parent) :
_logBrowser(0),
_contextMenu(0),
_recentActionsMenu(0),
_quotaInfo(0),
_folderOpenActionMapper(new QSignalMapper(this)),
_recentItemsMapper(new QSignalMapper(this)),
_app(parent)
@ -98,11 +97,6 @@ void ownCloudGui::slotOpenSettingsDialog( bool openSettings )
}
}
QuotaInfo *ownCloudGui::quotaInfo() const
{
return _quotaInfo;
}
void ownCloudGui::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
{
// A click on the tray icon should only open the status window on Win and
@ -363,8 +357,6 @@ void ownCloudGui::setupActions()
_actionLogout = new QAction(tr("Sign out"), this);
connect(_actionLogout, SIGNAL(triggered()), _app, SLOT(slotLogout()));
_quotaInfo = new QuotaInfo(this);
connect(_quotaInfo, SIGNAL(quotaUpdated(qint64,qint64)), SLOT(slotRefreshQuotaDisplay(qint64,qint64)));
}
void ownCloudGui::slotRefreshQuotaDisplay( qint64 total, qint64 used )

View File

@ -42,8 +42,6 @@ public:
bool checkAccountExists(bool openSettings);
QuotaInfo *quotaInfo() const;
signals:
void setupProxy();
@ -94,8 +92,6 @@ private:
QAction *_actionHelp;
QAction *_actionQuit;
QuotaInfo *_quotaInfo;
QSignalMapper *_folderOpenActionMapper;
QSignalMapper *_recentItemsMapper;

View File

@ -72,6 +72,72 @@ void PropagateItemJob::done(SyncFileItem::Status status, const QString &errorStr
emit finished(status);
}
/**
* For delete or remove, check that we are not removing from a shared directory.
* If we are, try to restore the file
*
* Return true if the problem is handled.
*/
bool PropagateItemJob::checkForProblemsWithShared(const QString& msg)
{
QString errorString = QString::fromUtf8(ne_get_error(_propagator->_session));
int httpStatusCode = errorString.mid(0, errorString.indexOf(QChar(' '))).toInt();
PropagateItemJob *newJob = NULL;
if( httpStatusCode == 403 && _propagator->isInSharedDirectory(_item._file )) {
if( _item._type != SyncFileItem::Directory ) {
SyncFileItem downloadItem(_item);
if (downloadItem._instruction == CSYNC_INSTRUCTION_NEW) {
// don't try to recover pushing new files
return false;
} else if (downloadItem._instruction == CSYNC_INSTRUCTION_SYNC) {
// we modified the file locally, jsut create a conflict then
downloadItem._instruction = CSYNC_INSTRUCTION_CONFLICT;
} else {
// the file was removed or renamed, just recover the old one
downloadItem._instruction = CSYNC_INSTRUCTION_SYNC;
}
downloadItem._dir = SyncFileItem::Down;
newJob = new PropagateDownloadFileLegacy(_propagator, downloadItem);
} else {
// Directories are harder to recover.
// But just re-create the directory, next sync will be able to recover the files
SyncFileItem mkdirItem(_item);
mkdirItem._instruction = CSYNC_INSTRUCTION_SYNC;
mkdirItem._dir = SyncFileItem::Down;
newJob = new PropagateLocalMkdir(_propagator, mkdirItem);
// Also remove the inodes and fileid from the db so no further renames are tried for
// this item.
_propagator->_journal->avoidRenamesOnNextSync(_item._file);
}
if( newJob ) {
newJob->setRestoreJobMsg(msg);
_restoreJob.reset(newJob);
connect(_restoreJob.data(), SIGNAL(completed(SyncFileItem)),
this, SLOT(slotRestoreJobCompleted(SyncFileItem)));
_restoreJob->start();
}
return true;
}
return false;
}
void PropagateItemJob::slotRestoreJobCompleted(const SyncFileItem& item )
{
QString msg;
if(_restoreJob) {
msg = _restoreJob->restoreJobMsg();
_restoreJob->setRestoreJobMsg();
}
if( item._status == SyncFileItem::Success || item._status == SyncFileItem::Conflict) {
done( SyncFileItem::SoftError, msg);
} else {
done( item._status, tr("A file or directory was removed from a read only share, but restoring failed: %1").arg(item._errorString) );
}
}
PropagateItemJob* OwncloudPropagator::createJob(const SyncFileItem& item) {
switch(item._instruction) {
case CSYNC_INSTRUCTION_REMOVE:

View File

@ -135,7 +135,20 @@ class PropagateItemJob : public PropagatorJob {
protected:
void done(SyncFileItem::Status status, const QString &errorString = QString());
bool checkForProblemsWithShared(const QString& msg);
/*
* set a custom restore job message that is used if the restore job succeeded.
* It is displayed in the activity view.
*/
QString restoreJobMsg() const { return _restoreJobMsg; }
void setRestoreJobMsg( const QString& msg = QString() ) { _restoreJobMsg = msg; }
SyncFileItem _item;
QString _restoreJobMsg;
protected slots:
void slotRestoreJobCompleted(const SyncFileItem& );
private:
QScopedPointer<PropagateItemJob> _restoreJob;

View File

@ -152,8 +152,11 @@ void PropagateUploadFileLegacy::start()
done( SyncFileItem::SoftError, errMsg );
} else {
// Other HBF error conditions.
// FIXME: find out the error class.
_item._httpErrorCode = hbf_fail_http_code(trans.data());
if(checkForProblemsWithShared(tr("The file was edited locally but is part of a read only share. "
"It is restored and your edit is in the conflict file.")))
return;
done(SyncFileItem::NormalError, hbf_error_string(trans.data(), state));
}
return;

View File

@ -54,53 +54,6 @@
namespace Mirall {
/**
* For delete or remove, check that we are not removing from a shared directory.
* If we are, try to restore the file
*
* Return true if the problem is handled.
*/
bool PropagateNeonJob::checkForProblemsWithShared()
{
QString errorString = QString::fromUtf8(ne_get_error(_propagator->_session));
int httpStatusCode = errorString.mid(0, errorString.indexOf(QChar(' '))).toInt();
if( httpStatusCode == 403 && _propagator->isInSharedDirectory(_item._file )) {
if( _item._type != SyncFileItem::Directory ) {
// the file was removed locally from a read only Shared sync
// the file is gone locally and it should be recovered.
SyncFileItem downloadItem(_item);
downloadItem._instruction = CSYNC_INSTRUCTION_SYNC;
downloadItem._dir = SyncFileItem::Down;
_restoreJob.reset(new PropagateDownloadFileLegacy(_propagator, downloadItem));
} else {
// Directories are harder to recover.
// But just re-create the directory, next sync will be able to recover the files
SyncFileItem mkdirItem(_item);
mkdirItem._instruction = CSYNC_INSTRUCTION_SYNC;
mkdirItem._dir = SyncFileItem::Down;
_restoreJob.reset(new PropagateLocalMkdir(_propagator, mkdirItem));
// Also remove the inodes and fileid from the db so no further renames are tried for
// this item.
_propagator->_journal->avoidRenamesOnNextSync(_item._file);
}
connect(_restoreJob.data(), SIGNAL(completed(SyncFileItem)),
this, SLOT(slotRestoreJobCompleted(SyncFileItem)));
QMetaObject::invokeMethod(_restoreJob.data(), "start");
return true;
}
return false;
}
void PropagateNeonJob::slotRestoreJobCompleted(const SyncFileItem& item )
{
if( item._status == SyncFileItem::Success ) {
done( SyncFileItem::SoftError, tr("The file was removed from a read only share. The file has been restored."));
} else {
done( item._status, tr("A file was removed from a read only share, but restoring failed: %1").arg(item._errorString) );
}
}
// Code copied from Qt5's QDir::removeRecursively
static bool removeRecursively(const QString &path)
{
@ -171,7 +124,7 @@ void PropagateRemoteRemove::start()
qDebug() << "** DELETE " << uri.data();
int rc = ne_delete(_propagator->_session, uri.data());
if( checkForProblemsWithShared() ) {
if( checkForProblemsWithShared(tr("The file has been removed from a read only share. It was restored.")) ) {
return;
}
@ -270,7 +223,7 @@ void PropagateRemoteRename::start()
int rc = ne_move(_propagator->_session, 1, uri1.data(), uri2.data());
if( checkForProblemsWithShared()) {
if( checkForProblemsWithShared(tr("The file was renamed but is part of a read only share. The original file was restored."))) {
return;
}

View File

@ -58,18 +58,10 @@ protected:
*/
void limitBandwidth(qint64 progress, qint64 limit);
bool checkForProblemsWithShared();
QElapsedTimer _lastTime;
qint64 _lastProgress;
int _httpStatusCode;
protected slots:
void slotRestoreJobCompleted(const SyncFileItem& );
private:
QScopedPointer<PropagateItemJob> _restoreJob;
public:
PropagateNeonJob(OwncloudPropagator* propagator, const SyncFileItem &item)
: PropagateItemJob(propagator, item), _lastProgress(0), _httpStatusCode(0) {

View File

@ -27,18 +27,17 @@ static const int failIntervalT = 5*1000;
static const int initialTimeT = 1*1000;
}
QuotaInfo::QuotaInfo(QObject *parent)
: QObject(parent)
, _account(AccountManager::instance()->account())
QuotaInfo::QuotaInfo(Account *account)
: QObject(account)
, _account(account)
, _lastQuotaTotalBytes(0)
, _lastQuotaUsedBytes(0)
, _refreshTimer(new QTimer(this))
, _jobRestartTimer(new QTimer(this))
{
connect(AccountManager::instance(), SIGNAL(accountChanged(Account*,Account*)),
SLOT(slotAccountChanged(Account*,Account*)));
connect(_refreshTimer, SIGNAL(timeout()), SLOT(slotCheckQuota()));
_refreshTimer->setSingleShot(true);
_refreshTimer->start(initialTimeT);
connect(_account, SIGNAL(stateChanged(int)), SLOT(slotAccountStateChanged(int)));
connect(_jobRestartTimer, SIGNAL(timeout()), SLOT(slotCheckQuota()));
_jobRestartTimer->setSingleShot(true);
_jobRestartTimer->start(initialTimeT);
}
void QuotaInfo::slotAccountChanged(Account *newAccount, Account *oldAccount)
@ -50,39 +49,49 @@ void QuotaInfo::slotAccountChanged(Account *newAccount, Account *oldAccount)
void QuotaInfo::slotAccountStateChanged(int state)
{
if (state == Account::Connected) {
switch (state) {
case Account::SignedOut: // fall through
case Account::InvalidCredidential:
_jobRestartTimer->stop();
break;
case Account::Connected: // fall through
case Account::Disconnected:
slotCheckQuota();
} else {
_refreshTimer->stop();
}
}
void QuotaInfo::slotRequestFailed()
{
_refreshTimer->start(failIntervalT);
if (!_account.isNull() && _account->state() == Account::Connected) {
_account->setState(Account::Disconnected);
}
_lastQuotaTotalBytes = 0;
_lastQuotaUsedBytes = 0;
_jobRestartTimer->start(failIntervalT);
_jobRestartTimer->start(failIntervalT);
}
void QuotaInfo::slotCheckQuota()
{
if (!_account.isNull() && _account->credentials() && _account->credentials()->ready()
&& _account->state() == Account::Connected) {
if (!_account.isNull() && _account->credentials() && _account->credentials()->ready()) {
CheckQuotaJob *job = new CheckQuotaJob(_account, "/", this);
connect(job, SIGNAL(quotaRetrieved(qint64,qint64)), SLOT(slotUpdateLastQuota(qint64,qint64)));
connect(job, SIGNAL(networkError(QNetworkReply*)), SLOT(slotRequestFailed()));
job->start();
} else {
_lastQuotaTotalBytes = 0;
_lastQuotaUsedBytes = 0;
_refreshTimer->start(failIntervalT);
}
}
void QuotaInfo::slotUpdateLastQuota(qint64 total, qint64 used)
{
if(_account->state() == Account::Disconnected) {
_account->setState(Account::Connected);
}
_lastQuotaTotalBytes = total;
_lastQuotaUsedBytes = used;
emit quotaUpdated(total, used);
_refreshTimer->start(defaultIntervalT);
_jobRestartTimer->start(defaultIntervalT);
}
}

View File

@ -11,6 +11,9 @@
* for more details.
*/
#ifndef QUOTAINFO_H
#define QUOTAINFO_H
#include <QObject>
#include <QPointer>
@ -23,7 +26,7 @@ class Account;
class QuotaInfo : public QObject {
Q_OBJECT
public:
QuotaInfo(QObject *parent);
QuotaInfo(Account *account);
qint64 lastQuotaTotalBytes() const { return _lastQuotaTotalBytes; }
qint64 lastQuotaUsedBytes() const { return _lastQuotaUsedBytes; }
@ -44,9 +47,11 @@ private:
QPointer<Account> _account;
qint64 _lastQuotaTotalBytes;
qint64 _lastQuotaUsedBytes;
QTimer *_refreshTimer;
QTimer *_jobRestartTimer;
};
} // namespace Mirall
#endif //QUOTAINFO_H

View File

@ -78,10 +78,6 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) :
connect( folderMan, SIGNAL(folderSyncStateChange(QString)),
this, SLOT(slotSyncStateChange(QString)));
QuotaInfo *quotaInfo = gui->quotaInfo();
connect( quotaInfo, SIGNAL(quotaUpdated(qint64,qint64)),
_accountSettings, SLOT(slotUpdateQuota(qint64,qint64)));
_accountSettings->slotUpdateQuota(quotaInfo->lastQuotaTotalBytes(), quotaInfo->lastQuotaUsedBytes());
connect( _accountSettings, SIGNAL(folderChanged()), gui, SLOT(slotFoldersChanged()));
connect( _accountSettings, SIGNAL(openFolderAlias(const QString&)),
gui, SLOT(slotFolderOpenAction(QString)));
@ -132,10 +128,11 @@ SettingsDialog::~SettingsDialog()
void SettingsDialog::addAccount(const QString &title, QWidget *widget)
{
_accountItem = new QListWidgetItem(Theme::instance()->syncStateIcon(SyncResult::Undefined, true), title);
_accountItem = new QListWidgetItem(title);
_accountItem->setSizeHint(QSize(0, 32));
_ui->labelWidget->addItem(_accountItem);
_ui->stack->addWidget(widget);
slotSyncStateChange();
}
@ -145,9 +142,11 @@ void SettingsDialog::slotSyncStateChange(const QString& alias)
SyncResult state = folderMan->accountStatus(folderMan->map().values());
_accountItem->setIcon(Theme::instance()->syncStateIcon(state.status()));
Folder *folder = folderMan->folder(alias);
if( folder ) {
_accountSettings->slotUpdateFolderState(folder);
if (!alias.isEmpty()) {
Folder *folder = folderMan->folder(alias);
if( folder ) {
_accountSettings->slotUpdateFolderState(folder);
}
}
}

View File

@ -45,7 +45,7 @@ public:
void setGeneralErrors( const QStringList& errors );
public slots:
void slotSyncStateChange(const QString& alias);
void slotSyncStateChange(const QString& alias = QString());
void slotRefreshResultList();
void showActivityPage();

View File

@ -69,7 +69,6 @@ static bool isSelfSigned(const QSslCertificate &certificate)
certificate.issuerInfo(QSslCertificate::OrganizationalUnitName) == certificate.subjectInfo(QSslCertificate::OrganizationalUnitName);
}
QMenu* SslButton::buildCertMenu(QMenu *parent, const QSslCertificate& cert,
const QList<QSslCertificate>& userApproved, int pos)
{
@ -79,6 +78,8 @@ QMenu* SslButton::buildCertMenu(QMenu *parent, const QSslCertificate& cert,
QString country = QStringList(cert.subjectInfo(QSslCertificate::CountryName)).join(QChar(';'));
QString state = QStringList(cert.subjectInfo(QSslCertificate::StateOrProvinceName)).join(QChar(';'));
QString issuer = QStringList(cert.issuerInfo(QSslCertificate::CommonName)).join(QChar(';'));
if (issuer.isEmpty())
issuer = QStringList(cert.issuerInfo(QSslCertificate::OrganizationalUnitName)).join(QChar(';'));
QString md5 = Utility::formatFingerprint(cert.digest(QCryptographicHash::Md5).toHex());
QString sha1 = Utility::formatFingerprint(cert.digest(QCryptographicHash::Sha1).toHex());
QString serial = QString::fromUtf8(cert.serialNumber(), true);
@ -136,8 +137,8 @@ QMenu* SslButton::buildCertMenu(QMenu *parent, const QSslCertificate& cert,
QString certId = cn.isEmpty() ? ou : cn;
if (QSslSocket::systemCaCertificates().contains(cert) && pos == 0) {
txt += tr("%1 (in Root CA store)").arg(certId);
if (QSslSocket::systemCaCertificates().contains(cert)) {
txt += certId;
} else {
if (isSelfSigned(cert)) {
txt += tr("%1 (self-signed)").arg(certId);
@ -178,15 +179,19 @@ void SslButton::updateAccountInfo(Account *account)
QList<QSslCertificate> chain = account->sslConfiguration().peerCertificateChain();
menu->addAction(tr("Certificate information:"))->setEnabled(false);
QListIterator<QSslCertificate> caIt(QSslSocket::systemCaCertificates());
caIt.toBack();
QList<QSslCertificate> tmpChain;
foreach(QSslCertificate cert, chain) {
tmpChain << cert;
if (QSslSocket::systemCaCertificates().contains(cert))
break;
}
chain = tmpChain;
// find trust anchor (informational only, verification is done by QSslSocket!)
while (caIt.hasPrevious()) {
QSslCertificate rootCA = caIt.previous();
foreach(QSslCertificate rootCA, QSslSocket::systemCaCertificates()) {
if (rootCA.issuerInfo(QSslCertificate::CommonName) == chain.last().issuerInfo(QSslCertificate::CommonName) &&
rootCA.issuerInfo(QSslCertificate::Organization) == chain.last().issuerInfo(QSslCertificate::Organization)
&& !isSelfSigned(rootCA)) {
chain << rootCA;
rootCA.issuerInfo(QSslCertificate::Organization) == chain.last().issuerInfo(QSslCertificate::Organization)) {
chain.append(rootCA);
break;
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) by Daniel Molkentin <danimo@owncloud.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include "creds/abstractcredentials.h"
#include "creds/credentialsfactory.h"
#include "mirall/account.h"
#include "wizard/owncloudwizard.h"
#include "wizard/abstractcredswizardpage.h"
namespace Mirall {
void AbstractCredentialsWizardPage::cleanupPage()
{
Account *account = static_cast<OwncloudWizard*>(wizard())->account();
AbstractCredentials *creds = account->credentials();
if (creds) {
if (!creds->inherits("DummyCredentials")) {
account->setCredentials(CredentialsFactory::create("dummy"));
}
}
}
}

View File

@ -24,7 +24,8 @@ class AbstractCredentials;
class AbstractCredentialsWizardPage : public QWizardPage
{
public:
virtual AbstractCredentials* getCredentials() const = 0;
void cleanupPage();
virtual AbstractCredentials* getCredentials() const = 0;
};
} // ns Mirall

View File

@ -38,8 +38,8 @@ void OwncloudShibbolethCredsPage::setupBrowser()
}
OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard*>(wizard());
_browser = new ShibbolethWebView(ocWizard->account());
connect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie)),
this, SLOT(slotShibbolethCookieReceived(QNetworkCookie)));
connect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie, Account*)),
this, SLOT(slotShibbolethCookieReceived(QNetworkCookie, Account*)));
connect(_browser, SIGNAL(viewHidden()),
this, SLOT(slotViewHidden()));
connect(_browser, SIGNAL(otherCookiesReceived(QList<QNetworkCookie>, QUrl)),

View File

@ -1,3 +1,15 @@
/*
* Copyright (C) by Daniel Molkentin <danimo@owncloud.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include "../../../src/mirall/utility.h"
#include <QDir>

View File

@ -1,4 +1,17 @@
#!/usr/bin/env perl
#
# Copyright (C) by Daniel Molkentin <danimo@owncloud.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
use strict;
use File::Path qw(make_path);
use File::Basename qw(dirname);

View File

@ -1,4 +1,17 @@
#!/usr/bin/env perl
#
# Copyright (C) by Daniel Molkentin <danimo@owncloud.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
use strict;
use Data::Random::WordList;

View File

@ -2372,4 +2372,4 @@ Bitte stellen Sie sicher, dass Ihre Netzwerkverbindung funktioniert.</translatio
<translation>Synchronisation wurde angehalten</translation>
</message>
</context>
</TS>
</TS>