This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 162574 - Keystore Name should be checked for correctness
Summary: Keystore Name should be checked for correctness
Status: RESOLVED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC All
: P4 blocker (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks: 162137
  Show dependency tree
 
Reported: 2009-04-14 11:53 UTC by alex_pst
Modified: 2013-04-18 02:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alex_pst 2009-04-14 11:53:29 UTC
Keystore name specified in "Add Keystore" dialog should be checked for correctness. It's possible to specify names like
“keystore>.ks”, “?keystore.ks”, “key*store.ks”, “key”st”ore.ks”, “keystore.ks”, “<keystore.ks”. Keystore is added to the
keystores list, but it is useful. There is IOException in log caused by wrong file name:
WARNING [org.openide.filesystems.FileUtil]: getCanonicalFile() on file C:\Documents and Settings\user\key*store.ks
failed: java.io.IOException: Invalid argument
Comment 1 Denis Anisimov 2009-04-15 08:50:37 UTC
Needs to verify resulting keystore file path .
Comment 2 Denis Anisimov 2009-04-15 09:07:42 UTC
changeset:   126652:817d4dfac6b2
user:        Denis Anisimov <ads@netbeans.org>
date:        Wed Apr 15 12:03:20 2009 +0400
summary:     Fix for IZ#162574 - Keystore Name should be checked for correctness
Comment 3 Quality Engineering 2009-04-15 19:32:35 UTC
Integrated into 'main-golden', will be available in build *200904151401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/817d4dfac6b2
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for IZ#162574 - Keystore Name should be checked for correctness
Comment 4 Andrei Chistiakov 2009-07-27 15:58:53 UTC
Verified with NetBeans IDE Dev (Build 200907270201)
Comment 5 Alexandr Scherbatiy 2011-02-01 14:52:01 UTC
The issue is reproduced in NB 6.9.1

Steps to reproduce:
- Go to Tools->Keystores
- Press Add Keystore
- Set “keystore>.ks” as a keystore name
The keystore>.ks is added.
Comment 6 Adam Sotona 2011-03-04 11:23:24 UTC
The file name validity is checked by file.getCanonicalPath();
Unfortunately some characters pass through even this check and Java does not provide any stronger check.
Comment 7 David Strupl 2013-04-09 11:22:50 UTC
Assigning to the new owner of javame modules.
Comment 8 Roman Svitanic 2013-04-17 13:29:14 UTC
http://hg.netbeans.org/jet-main/rev/fbca40e345c9
Comment 9 Quality Engineering 2013-04-18 02:20:37 UTC
Integrated into 'main-golden', will be available in build *201304172301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c1208579abc4
User: Roman Svitanic <rsvitanic@netbeans.org>
Log: #201484 (an #162574) - The keystore manager should not allow to use special characters in the keystore name