Compare commits

..

5 Commits

10 changed files with 51 additions and 15 deletions

View File

@ -1,3 +1,12 @@
----------------------------
0.4.4 (2015-12-08)
----------------------------
- Add hardening measures to prevent loading DLLs from the current working directory on Windows. (CVE-2015-8359)
- Fix CVE-2015-8378: Canceling XML export operation creates export as ".xml"
- Auto-type and global auto-type functionality for OS X
- Enable retina display on OS X
---------------------------- ----------------------------
0.4.3 (2010-03-07) 0.4.3 (2010-03-07)
---------------------------- ----------------------------

View File

@ -7,7 +7,11 @@
http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html
--> -->
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>icon.icns</string> <string>icon.icns</string>
@ -16,7 +20,7 @@
<string>APPL</string> <string>APPL</string>
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>KeePassX 0.4.3</string> <string>KeePassX 0.4.4</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>kpsx</string> <string>kpsx</string>
@ -25,10 +29,10 @@
<string>KeePassX</string> <string>KeePassX</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>0.4.3</string> <string>0.4.4</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.4.3</string> <string>0.4.4</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>KeePassX</string> <string>KeePassX</string>
@ -37,7 +41,7 @@
<string>6.0</string> <string>6.0</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>org.keepassx.keepassx</string> <string>com.apple.application-bundle</string>
<key>CFBundleDocumentTypes</key> <key>CFBundleDocumentTypes</key>
<array> <array>

View File

@ -55,11 +55,12 @@ AboutDialog::AboutDialog(QWidget* parent):QDialog(parent)
str+="</div><br><div style='margin-left:0px;'>"; str+="</div><br><div style='margin-left:0px;'>";
str+="<b>"+tr("Thanks To")+"</b><br>"; str+="<b>"+tr("Thanks To")+"</b><br>";
str+="</div><div style='margin-left:10px;'>"; str+="</div><div style='margin-left:10px;'>";
str+="<u>Matthias Miller</u><br>"+tr("Patches for better MacOS X support")+"<br>www.outofhanwell.com<br></div>"; str+="<u>Matthias Miller</u><br>"+tr("Patches for better MacOS X support")+"<br>www.outofhanwell.com<br>";
str+="<br>"; str+="<br>";
str+="<u>James Nicholls</u><br>"+tr("Main Application Icon")/*+"<br>"+tr("mailto:???")*/+"<br></div>"; str+="<u>James Nicholls</u><br>"+tr("Main Application Icon")/*+"<br>"+tr("mailto:???")*/+"<br>";
str+="<br>"; str+="<br>";
str+="<u>Constantin Makshin</u><br>"+tr("Various fixes and improvements")+"<br>dinosaur-rus@users.sourceforge.net<br></div>"; str+="<u>Constantin Makshin</u><br>"+tr("Various fixes and improvements")+"<br>dinosaur-rus@users.sourceforge.net<br>";
str+="</div>";
Edit_Thanks->setHtml(str); Edit_Thanks->setHtml(str);
QFile gpl(DataDir+"/license.html"); QFile gpl(DataDir+"/license.html");
@ -80,3 +81,8 @@ void AboutDialog::paintEvent(QPaintEvent *event){
painter.setClipRegion(event->region()); painter.setClipRegion(event->region());
painter.drawPixmap(QPoint(0,0),BannerPixmap); painter.drawPixmap(QPoint(0,0),BannerPixmap);
} }
void AboutDialog::resizeEvent(QResizeEvent* event){
createBanner(&BannerPixmap, getPixmap("keepassx"), QString("%1 %2").arg(APP_DISPLAY_NAME, APP_VERSION), width());
QDialog::resizeEvent(event);
}

View File

@ -32,6 +32,7 @@ class AboutDialog : public QDialog, private Ui_AboutDlg
private: private:
QPixmap BannerPixmap; QPixmap BannerPixmap;
virtual void paintEvent(QPaintEvent*); virtual void paintEvent(QPaintEvent*);
virtual void resizeEvent(QResizeEvent*);
}; };
#endif #endif

View File

@ -26,7 +26,7 @@
#define APP_CODE_NAME "keepassx" #define APP_CODE_NAME "keepassx"
#define APP_SHORT_FUNC "Password Manager" #define APP_SHORT_FUNC "Password Manager"
#define APP_LONG_FUNC "Cross Platform Password Manager" #define APP_LONG_FUNC "Cross Platform Password Manager"
#define APP_VERSION "0.4.3" #define APP_VERSION "0.4.4"
#define BUILTIN_ICONS 69 #define BUILTIN_ICONS 69

View File

@ -338,7 +338,7 @@ void KeepassEntryView::editEntry(EntryViewItem* item){
IEntryHandle* handle = item->EntryHandle; IEntryHandle* handle = item->EntryHandle;
CEntry old = handle->data(); CEntry old = handle->data();
CEditEntryDlg dlg(db,handle,this,true); CEditEntryDlg dlg(db,handle,this,false);
int result = dlg.exec(); int result = dlg.exec();
switch(result){ switch(result){
case 0: //canceled or no changes case 0: //canceled or no changes

View File

@ -120,6 +120,10 @@ QString QtStandardFileDialogs::saveFileDialog(QWidget* parent,QString title,QStr
ShowOverwriteWarning ? (QFileDialog::Option)0 : QFileDialog::DontConfirmOverwrite); ShowOverwriteWarning ? (QFileDialog::Option)0 : QFileDialog::DontConfirmOverwrite);
LastFilter=Filters.indexOf(SelectedFilter); LastFilter=Filters.indexOf(SelectedFilter);
//Dont't add an extension to the result if no file has been selected
if (filepath.isEmpty())
return filepath;
//Check whether the file has an extension which fits to the selected filter //Check whether the file has an extension which fits to the selected filter
QFileInfo file(filepath); QFileInfo file(filepath);
QString filename=file.fileName(); QString filename=file.fileName();

View File

@ -108,9 +108,8 @@ OSType HelperMacX::getProcessSignature(pid_t pid){
OSErr err; OSErr err;
ProcessSerialNumber processSerialNumber; ProcessSerialNumber processSerialNumber;
ProcessInfoRec processInfoRec; ProcessInfoRec processInfoRec;
memset(&processInfoRec, 0, sizeof(processInfoRec));
processInfoRec.processInfoLength = sizeof(processInfoRec); processInfoRec.processInfoLength = sizeof(processInfoRec);
processInfoRec.processAppSpec = NULL;
processInfoRec.processName = NULL;
err = GetProcessForPID(pid, &processSerialNumber); err = GetProcessForPID(pid, &processSerialNumber);
if (noErr != err) { if (noErr != err) {
qWarning("HelperMacX::getProcessSignature: GetProcessForPID error for pid %d: %d", pid, err); qWarning("HelperMacX::getProcessSignature: GetProcessForPID error for pid %d: %d", pid, err);

View File

@ -20,6 +20,10 @@
#ifndef RANDOM_H_ #ifndef RANDOM_H_
#define RANDOM_H_ #define RANDOM_H_
#ifndef _WIN32
#include <unistd.h> // for getpid()
#endif
#ifndef quint8 #ifndef quint8
typedef unsigned char quint8; typedef unsigned char quint8;
#endif #endif

View File

@ -24,6 +24,9 @@
#if defined(Q_WS_X11) && defined(GLOBAL_AUTOTYPE) #if defined(Q_WS_X11) && defined(GLOBAL_AUTOTYPE)
#include "Application_X11.h" #include "Application_X11.h"
#endif #endif
#ifdef Q_WS_WIN
#include <Windows.h>
#endif
#include "plugins/interfaces/IFileDialog.h" #include "plugins/interfaces/IFileDialog.h"
#include "plugins/interfaces/IKdeInit.h" #include "plugins/interfaces/IKdeInit.h"
@ -49,6 +52,12 @@ IIconTheme* IconLoader=NULL;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
#ifdef Q_WS_WIN
// Make sure Windows doesn't load DLLs from the current working directory
SetDllDirectoryA("");
SetSearchPathMode(BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE);
#endif
setlocale(LC_CTYPE, ""); setlocale(LC_CTYPE, "");
#if defined(Q_WS_X11) && defined(AUTOTYPE) #if defined(Q_WS_X11) && defined(AUTOTYPE)