--- modules/path/path.admin.inc	2009-07-12 10:41:39.000000000 +0100
+++ modules/path/path.admin.inc	2009-07-12 10:44:04.000000000 +0100
@@ -112,7 +112,7 @@ function path_admin_form(&$form_state, $
     '#default_value' => $edit['dst'],
     '#maxlength' => 255,
     '#size' => 45,
-    '#description' => t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path.'),
+    '#description' => t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'),
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
     '#required' => TRUE,
   );
--- modules/path/path.module.orig	2009-07-12 10:45:37.000000000 +0100
+++ modules/path/path.module	2009-07-12 21:25:18.000000000 +0100
@@ -83,6 +83,15 @@ function path_admin_delete($pid = 0) {
 function path_set_alias($path = NULL, $alias = NULL, $pid = NULL, $language = '') {
   $path = urldecode($path);
   $alias = urldecode($alias);
+    
+  // Remove combinations of dots and slashes from the alias.
+  $alias = str_replace('/.','',$alias);
+  $alias = str_replace('./','',$alias);
+  $alias = trim($alias, '.');    
+  
+  // Remove possible slashes from both ends to avoid invalid aliases.
+  $alias = trim($alias, '/');  
+  
   // First we check if we deal with an existing alias and delete or modify it based on pid.
   if ($pid) {
     // An existing alias.
@@ -234,7 +243,7 @@ function path_form_alter(&$form, $form_s
       '#maxlength' => 255,
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
-      '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'),
+      '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path.'),
     );
     if ($path) {
       $form['path']['pid'] = array(
