James Moger
2013-11-26 67389b9e7060b7f917a8383ec04d3a0c6bd24c5c
Fix NPE when adding a permission without a registrant (issue-344)

Change-Id: Id6bf070a43072a61a0034bd2d971fc819c9b03e3
3 files modified
10 ■■■■■ changed files
.classpath 5 ●●●●● patch | view | raw | blame | history
releases.moxie 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java 3 ●●●●● patch | view | raw | blame | history
.classpath
@@ -74,5 +74,10 @@
    <classpathentry kind="lib" path="ext/commons-logging-1.1.1.jar" sourcepath="ext/src/commons-logging-1.1.1.jar" />
    <classpathentry kind="lib" path="ext/commons-exec-1.1.jar" sourcepath="ext/src/commons-exec-1.1.jar" />
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" />
    <classpathentry kind="src" path="src/main/dagger">
        <attributes>
            <attribute name="optional" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="output" path="bin/classes" />
</classpath>
releases.moxie
@@ -12,6 +12,7 @@
    fixes:
    - Fixed support for implied SSH urls in web.otherUrls (issue-311)
    - Bind LDAP connection after establishing TLS initialization (issue-343)
    - Fixed NPE when attempting to add a permission without a registrant (issue-344)
    - Fix potential NPE on removing uncached repository from cache
    - Ignore the default contents of .git/description file
    - Fix error on generating activity page when there is no activity
@@ -72,6 +73,7 @@
    - Domingo Oropeza
    - Chris Graham
    - Guenter Dressel
    - fpeters.fae
}
#
src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
@@ -261,6 +261,9 @@
                if (rp.permission == null) {
                    return;
                }
                if (rp.registrant == null) {
                    return;
                }
                RegistrantAccessPermission copy = DeepCopier.copy(rp);
                if (StringUtils.findInvalidCharacter(copy.registrant) != null) {
                    copy.permissionType = PermissionType.REGEX;