[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3603: Removed silly validation rule

revision-diff.txt (3.01 KB)

Having the first character as not digit is not silly…

It is considered by many as good practice…

···

Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com

You Live by CHOICE, Not by CHANCE

On 12 May 2011 19:40, noreply@launchpad.net wrote:


revno: 3603

committer: Lars Helge Overland larshelge@gmail.com

branch nick: dhis2

timestamp: Thu 2011-05-12 19:38:50 +0200

message:

Removed silly validation rule

modified:

dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java

dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription

=== modified file ‘dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java’

— dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2011-05-12 09:25:07 +0000

+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2011-05-12 17:38:50 +0000

@@ -213,7 +213,7 @@

             // Insert name of indicator as value and title

             // -------------------------------------------------------------
  •            String displayValue = indicator != null ? "value=\"[ " + indicator.getName() + "]\"" : "[ Indicator does not exist ]";
    
  •            String displayValue = indicator != null ? "value=\"[ " + indicator.getName() + " ]\"" : "[ Indicator does not exist ]";
    
               String displayTitle = indicator != null ? "title=\"" + indicator.getName() + "\"" : "[ Indicator does not exist ]";
    
    
    
               inputHtml = inputHtml.contains( EMPTY_VALUE_TAG ) ? inputHtml.replace( EMPTY_VALUE_TAG, displayValue ) : inputHtml + " " + displayValue;
    

=== modified file ‘dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js’

— dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2011-05-11 07:32:33 +0000

+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2011-05-12 17:38:50 +0000

@@ -54,8 +54,7 @@

            "name" : {

                    "required" : true,

                    "rangelength" : [ 2, 210 ],
  •                   "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : true
    
  •                   "alphanumericwithbasicpuncspaces" : true
    
              },
    
              "memberValidator" : {
    
                      "required" : true
    

@@ -130,13 +129,11 @@

            "name" : {

                    "required" : true,

                    "alphanumericwithbasicpuncspaces" : true,
  •                   "firstletteralphabet" : false,
    
                      "rangelength" : [ 4, 150 ]
    
              },
    
              "shortName" : {
    
                      "required" : true,
    
                      "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : false,
    
                      "rangelength" : [ 2, 25 ]
    
              },
    
              "code" : {
    

@@ -248,7 +245,6 @@

                    "required" : true,

                    "alphanumericwithbasicpuncspaces" : true,

                    "notOnlyDigits" : true,
  •                   "firstletteralphabet" : true,
    
                      "rangelength" : [ 3, 150 ]
    
              }
    
      },
    

@@ -286,13 +282,11 @@

            "shortName" : {

                    "required" : true,

                    "rangelength" : [ 2, 25 ],
  •                   "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : true
    
  •                   "alphanumericwithbasicpuncspaces" : true
    
              },
    
              "alternativeName" : {
    
                      "rangelength" : [ 3, 150 ],
    
  •                   "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : true
    
  •                   "alphanumericwithbasicpuncspaces" : true
    
              },
    
              "code" : {
    
                      "rangelength" : [ 0, 25 ],
    

@@ -301,8 +295,7 @@

            },

            "description" : {

                    "rangelength" : [ 3, 250 ],
  •                   "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : true
    
  •                   "alphanumericwithbasicpuncspaces" : true
    
              },
    
              "url" : {
    
                      "url" : true,
    

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

I tend to agree with Saptarshi on this. What the devs may consider as
silly, may be actually be useful and good practice. I think this again
comes back to https://blueprints.launchpad.net/dhis2/+spec/regex-validation,
which basically outlines a way to allow implementers to define what is
"silly" and what is "not silly". I personally think the requirement to
have a password with a capital letter and a digit is silly and not
particularly secure, especially over default HTTP connections. Anyway,
my two cents.

···

On Thu, May 12, 2011 at 8:13 PM, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:

Having the first character as not digit is not silly...
It is considered by many as good practice...

---
Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 12 May 2011 19:40, <noreply@launchpad.net> wrote:

------------------------------------------------------------
revno: 3603
committer: Lars Helge Overland <larshelge@gmail.com>
branch nick: dhis2
timestamp: Thu 2011-05-12 19:38:50 +0200
message:
Removed silly validation rule
modified:

dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java

dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js

--
lp:dhis2
trunk : Code : DHIS

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to
OpenID transaction in progress

=== modified file
'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java'
---
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
2011-05-12 09:25:07 +0000
+++
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
2011-05-12 17:38:50 +0000
@@ -213,7 +213,7 @@
// Insert name of indicator as value and title
//
-------------------------------------------------------------

- String displayValue = indicator != null ? "value=\"[ " +
indicator.getName() + "]\"" : "[ Indicator does not exist ]";
+ String displayValue = indicator != null ? "value=\"[ " +
indicator.getName() + " ]\"" : "[ Indicator does not exist ]";
String displayTitle = indicator != null ? "title=\"" +
indicator.getName() + "\"" : "[ Indicator does not exist ]";

            inputHtml = inputHtml\.contains\( EMPTY\_VALUE\_TAG \) ?

inputHtml.replace( EMPTY_VALUE_TAG, displayValue ) : inputHtml + " " +
displayValue;

=== modified file
'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
---
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
2011-05-11 07:32:33 +0000
+++
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
2011-05-12 17:38:50 +0000
@@ -54,8 +54,7 @@
"name" : {
"required" : true,
"rangelength" : [ 2, 210 ],
- "alphanumericwithbasicpuncspaces" : true,
- "firstletteralphabet" : true
+ "alphanumericwithbasicpuncspaces" : true
},
"memberValidator" : {
"required" : true
@@ -130,13 +129,11 @@
"name" : {
"required" : true,
"alphanumericwithbasicpuncspaces" : true,
- "firstletteralphabet" : false,
"rangelength" : [ 4, 150 ]
},
"shortName" : {
"required" : true,
"alphanumericwithbasicpuncspaces" : true,
- "firstletteralphabet" : false,
"rangelength" : [ 2, 25 ]
},
"code" : {
@@ -248,7 +245,6 @@
"required" : true,
"alphanumericwithbasicpuncspaces" : true,
"notOnlyDigits" : true,
- "firstletteralphabet" : true,
"rangelength" : [ 3, 150 ]
}
},
@@ -286,13 +282,11 @@
"shortName" : {
"required" : true,
"rangelength" : [ 2, 25 ],
- "alphanumericwithbasicpuncspaces" : true,
- "firstletteralphabet" : true
+ "alphanumericwithbasicpuncspaces" : true
},
"alternativeName" : {
"rangelength" : [ 3, 150 ],
- "alphanumericwithbasicpuncspaces" : true,
- "firstletteralphabet" : true
+ "alphanumericwithbasicpuncspaces" : true
},
"code" : {
"rangelength" : [ 0, 25 ],
@@ -301,8 +295,7 @@
},
"description" : {
"rangelength" : [ 3, 250 ],
- "alphanumericwithbasicpuncspaces" : true,
- "firstletteralphabet" : true
+ "alphanumericwithbasicpuncspaces" : true
},
"url" : {
"url" : true,

_______________________________________________
Mailing list: DHIS 2 developers in Launchpad
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : DHIS 2 developers in Launchpad
More help : ListHelp - Launchpad Help

_______________________________________________
Mailing list: DHIS 2 developers in Launchpad
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : DHIS 2 developers in Launchpad
More help : ListHelp - Launchpad Help

--
Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+260974901293

Yes, thats an interesting point Jason in the blueprint and might be useful and flexible approach to validation

I feel brute-forcing is much more easier than man-in-the-middle.

I can’t be in say Kenya or Kerala, on the network of the guy logging in, but can sit here in Norway and brute force and get it.

We removed the captcha and that was sad!!

···

Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com

You Live by CHOICE, Not by CHANCE

On 12 May 2011 20:26, Jason Pickering jason.p.pickering@gmail.com wrote:

I tend to agree with Saptarshi on this. What the devs may consider as

silly, may be actually be useful and good practice. I think this again

comes back to https://blueprints.launchpad.net/dhis2/+spec/regex-validation,

which basically outlines a way to allow implementers to define what is

“silly” and what is “not silly”. I personally think the requirement to

have a password with a capital letter and a digit is silly and not

particularly secure, especially over default HTTP connections. Anyway,

my two cents.

On Thu, May 12, 2011 at 8:13 PM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

Having the first character as not digit is not silly…

It is considered by many as good practice…


Regards,

Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com

You Live by CHOICE, Not by CHANCE

On 12 May 2011 19:40, noreply@launchpad.net wrote:


revno: 3603

committer: Lars Helge Overland larshelge@gmail.com

branch nick: dhis2

timestamp: Thu 2011-05-12 19:38:50 +0200

message:

Removed silly validation rule

modified:

dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java

dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription

=== modified file

‘dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java’


dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java

2011-05-12 09:25:07 +0000

+++

dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java

2011-05-12 17:38:50 +0000

@@ -213,7 +213,7 @@

            // Insert name of indicator as value and title
            //

  •            String displayValue = indicator != null ? "value=\"[ " +
    

indicator.getName() + “]"” : “[ Indicator does not exist ]”;

  •            String displayValue = indicator != null ? "value=\"[ " +
    

indicator.getName() + " ]"" : “[ Indicator does not exist ]”;

            String displayTitle = indicator != null ? "title=\"" +

indicator.getName() + “"” : “[ Indicator does not exist ]”;

            inputHtml = inputHtml.contains( EMPTY_VALUE_TAG ) ?

inputHtml.replace( EMPTY_VALUE_TAG, displayValue ) : inputHtml + " " +

displayValue;

=== modified file

‘dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js’


dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js

2011-05-11 07:32:33 +0000

+++

dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js

2011-05-12 17:38:50 +0000

@@ -54,8 +54,7 @@

           "name" : {
                   "required" : true,
                   "rangelength" : [ 2, 210 ],
  •                   "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : true
    
  •                   "alphanumericwithbasicpuncspaces" : true
    
           },
           "memberValidator" : {
                   "required" : true

@@ -130,13 +129,11 @@

           "name" : {
                   "required" : true,
                   "alphanumericwithbasicpuncspaces" : true,
  •                   "firstletteralphabet" : false,
    
                   "rangelength" : [ 4, 150 ]
           },
           "shortName" : {
                   "required" : true,
                   "alphanumericwithbasicpuncspaces" : true,
  •                   "firstletteralphabet" : false,
    
                   "rangelength" : [ 2, 25 ]
           },
           "code" : {

@@ -248,7 +245,6 @@

                   "required" : true,
                   "alphanumericwithbasicpuncspaces" : true,
                   "notOnlyDigits" : true,
  •                   "firstletteralphabet" : true,
    
                   "rangelength" : [ 3, 150 ]
           }
   },

@@ -286,13 +282,11 @@

           "shortName" : {
                   "required" : true,
                   "rangelength" : [ 2, 25 ],
  •                   "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : true
    
  •                   "alphanumericwithbasicpuncspaces" : true
    
           },
           "alternativeName" : {
                   "rangelength" : [ 3, 150 ],
  •                   "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : true
    
  •                   "alphanumericwithbasicpuncspaces" : true
    
           },
           "code" : {
                   "rangelength" : [ 0, 25 ],

@@ -301,8 +295,7 @@

           },
           "description" : {
                   "rangelength" : [ 3, 250 ],
  •                   "alphanumericwithbasicpuncspaces" : true,
    
  •                   "firstletteralphabet" : true
    
  •                   "alphanumericwithbasicpuncspaces" : true
    
           },
           "url" : {
                   "url" : true,

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering

email: jason.p.pickering@gmail.com

tel:+260974901293